-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: A way to reinitialize slimScroll after an AJAX Request #14
Comments
hey joeytheman, can you set up a demo page where this issue is visible? |
This feature would be lovely indeed. |
In my case it is not needed. I didn't initially realize the scroller automatically adjusted if additional content was added. Before I discovered this I wrote some code to remove the slim scrol div s and re initialize slim scroll after content was added. |
I need it to adjust the height in case the size of the container changes. |
Did you test if the slim scroll automatically adjusts? If it doesn't here is the function I came up with.
It runs in an Let me know if you have any questions or if I can be of any other assistance. |
For what I saw it doesn't really adjust. Also if I call it twice I get two scrollbars. |
from version 1.1.0 onwards slimscroll will recalculate the scrollbar size when you call it again on the same element. So now, in your ajax callbacks you can simply call: $("#myElement").slimScroll() again. |
I have an region that I add and remove items from through ajax requests using slimScroll. When I call slimScroll on the region after additional elements have been added or removed, the region is given additional scrollbars.
As a workaround, I am manually removing the elements added by slimScroll and then calling slimScroll() again.
The text was updated successfully, but these errors were encountered: