Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Offset calculation error.

  • Loading branch information...
commit e584c0ad5e287ab714ee076c9d271d0cda31245e 1 parent 0e7c8d0
@dutchcelt authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  keepinview.js
View
2  keepinview.js
@@ -91,7 +91,7 @@
if ( $(window).height() < parseInt(offset.top + $elem.outerHeight() - Math.abs($(window).scrollTop())+options.edgeOffset,10) && !options.fixed ) {
scrolledOutAt = "bottom";
};
- if ( ($(window).scrollTop())+options.edgeOffset > offset.top && !options.fixed) {
+ if ( ($(window).scrollTop()) > offset.top - options.edgeOffset && !options.fixed) {
scrolledOutAt = "top";
};
if(!options.customClass){
Please sign in to comment.
Something went wrong with that request. Please try again.