Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update js/stickysidebar.jquery.js #2

Merged
merged 1 commit into from

2 participants

@jrmlstf

To start moving the stickybox before it reaches the top of the window.

@jrmlstf jrmlstf Update js/stickysidebar.jquery.js
To start moving de stickybox before it reaches the top of the window.
87c6860
@p-m-p p-m-p merged commit 401107f into p-m-p:master
@p-m-p
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 8, 2012
  1. @jrmlstf

    Update js/stickysidebar.jquery.js

    jrmlstf authored
    To start moving de stickybox before it reaches the top of the window.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  js/stickysidebar.jquery.js
View
3  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;
Something went wrong with that request. Please try again.