garand / sticky

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

Call wrapAll function after every window resize #189

Open grigorievk opened 8 years ago

grigorievk commented 8 years ago

If you resize the window the #sticky-wrapper element will be wrapped by itself again.

Code to fix:

stickyElement.wrapAll(function() {
    if ($(this).parent("#" + wrapperId).length == 0) {
        return wrapper
    }
});
PixelBaer commented 8 years ago

Hi, I am facing this issue right now. can you tell me, where to insert this code exactly? thanks

PixelBaer commented 8 years ago

nvm just figured it out: replace the line stickyElement.wrapAll(wrapper); in jquery.sticky.js with the code posted above