Permalink
Browse files

Update js/stickysidebar.jquery.js

To start moving de stickybox before it reaches the top of the window.
  • Loading branch information...
1 parent 7ffb7a7 commit 87c6860dc9eb91b3ec816fe11e9066f8c9dddd65 @jrmlstf committed Nov 8, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 js/stickysidebar.jquery.js
@@ -5,6 +5,7 @@
, easing: "linear" //use easing plugin for more options
, padding: 10
, constrain: false
+ , offset: 0
}
, $window = $(window)
, stickyboxes = []
@@ -51,7 +52,7 @@
var $this = $sb
, data = $this.data("stickySB");
if (data) {
- var sTop = $window.scrollTop() - data.offs.top
+ var sTop = $window.scrollTop() - data.offs.top + settings.offset
, currOffs = $this.offset()
, origTop = data.orig.offset.top - data.offs.top
, animTo = origTop;

0 comments on commit 87c6860

Please sign in to comment.