Skip to content

Commit

Permalink
Substracted padding variables to bottom and top container
Browse files Browse the repository at this point in the history
* Fixed issue with that adding padding makes pinned element overlap
container
  • Loading branch information
Camzilla committed Aug 27, 2014
1 parent 7d52f57 commit 7abf2e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions jquery.pin.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@

elmts.push($this);

var from = data.from,
to = data.to;
var from = data.from - data.pad.bottom,
to = data.to - data.pad.top;

if (from + $this.outerHeight() > data.end) {
$this.css('position', '');
Expand Down
5 changes: 1 addition & 4 deletions jquery.pin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7abf2e4

Please sign in to comment.