Way to destroy and rebuild smartscroll? Ajax use cases?
Opened this issue · 1 comments
affinitycreative commented
Hello! Is there a way to disable / re-enable smartscroll when content is pulled in dynamically?
Do you have any knowledge of ajax/dynamic use cases? i.e. pulling in a page that uses smartscroll?
Thanks!
d4nyll commented
Do you have a more solid example?
Smartscroll works by binding functions to window
, so the most naive way is simply to unbind all the window events.
$(window).unbind();
But this might affect other libraries you're using. So you might have to run this before other libraries are ran.
To re-enable smartscroll, just run the initialisation script again.
$.smartscroll(options);