jquery-scroll
jquery-scroll copied to clipboard
Adjust for dynamically changed container size.
I added so that the height of the handle container is updated in the repaint method.
This makes sense if you programatically want to alter the size of your scrollable container after the fact.
EDIT: Made a few more changes to accommodate for a resized element:
- As the element is resized to be bigger than the content, the scroller gets hidden.
- If the user have scrolled down a bit, and then the element is resized so that the scroller is no longer needed, the content should be scrolled up so that the entire content can be seen.
- The scroller elements are always created, they are now hidden instead if the container is large enough for the entire content to be seen. The reason for this is that the scroller elements might be needed later if the container is made smaller.