wduffy / jScroll

jScroll is a jQuery plugin that keeps an element in view when a user scrolls.
http://www.wduffy.co.uk/jScroll
73 stars 19 forks source link

"undo" $(".myDiv).jScroll() #11

Open jprior opened 12 years ago

jprior commented 12 years ago

This is not really an issue, but more of a feature request, or question. I use a simple function comparing the div height and the window height to determine if $(".myDiv").jScroll(); should be used or not. It works until the window is resized. To fix this I run the function on $(window).resize, which helps, but I still have an issue when resizing from the allowed scroll height to the unallowed scroll height... I believe I just need to "undo" the initial $(".myDiv").jScroll() at the beginning of my function and run the comparison logic again. Long story short, is there a way to "undo" $(".myDiv").jScroll() after it has already been run?