garand / sticky

jQuery Plugin for Sticky Objects
Other
3.3k stars 1.06k forks source link

stickyWrapper is renedered as unexpected additional white block. #120

Open selifan opened 10 years ago

selifan commented 10 years ago

I'm using Sticky for menu toolbar, contained in "absolute"-positioned div. Without sticky this toolbar was placed "over" my "top" html block, and didn't generate additional height of the document. After adding "sticky" functionality, document "top part" becomes higher, because of visible wrapper that has a calculated height equivalent to th height of my menu toolbar. I could fix it by changing code in the line 102: was: stickyWrapper.css('height', stickyElement.outerHeight()); now: stickyWrapper.css('height', 0); This workaround looks fine for me in IE10, Firefox. May be non-zero height needed in some other brawsers or sitiuations. In that case, may be a good solution to change wrapper height dinamically in scroll event ?

bubbleheadinc commented 9 years ago

+1