Permalink
Browse files

Added with calculation back. Updated Readme.

  • Loading branch information...
1 parent 8c6a365 commit 8fd813924455871d8c1ec69d90ad810aed5e3b28 @polarblau committed Oct 9, 2011
Showing with 4 additions and 3 deletions.
  1. +0 −2 README.markdown
  2. +4 −1 src/jquery.stickysectionheaders.js
View
@@ -83,7 +83,5 @@ ul {
#sticky-list > ul > li.sticky strong {
position: absolute;
left: 0;
- right: 0;
- top: 0;
}
```
@@ -34,7 +34,10 @@
if (top < 0) {
$this.addClass(settings.stickyClass).css('paddingTop', headHeight);
- $head.css('top', (height + top < headHeight) ? (headHeight - (top + height)) * -1 : '' );
+ $head.css({
+ 'top' : (height + top < headHeight) ? (headHeight - (top + height)) * -1 : '',
+ 'width': $this.outerWidth() - $head.cssSum('paddingLeft', 'paddingRight')
+ });
} else {
$this.removeClass(settings.stickyClass).css('paddingTop', '');
}

0 comments on commit 8fd8139

Please sign in to comment.