Reputation: 582
I have the nicescroll plugin working perfect, but what I need it to do is scroll to the BOTTOM of the latest update automatically. I don't need a resize()
lesson, that works fine. It appears the plugin has no methods.
Is there is a like plugin that does??
Upvotes: 1
Views: 6730
Reputation:
$(element).getNiceScroll().doScrollPos(0,$(last-element).position().top);
Upvotes: 2
Reputation: 129
I met the same kind of problem. But what I need to do is detect when scrollbar touches the bottom. I found the solution on github:
var nice = $("#yourDiv").getNiceScroll();
if(nice.getScrollTop() == nice.page.maxh) {
// the scrollbar touches the bottom now
}
See also: https://github.com/inuyaksa/jquery.nicescroll/issues/71
Hope it helps.
PS: My nicescroll version is 3
Upvotes: 1
Reputation: 726
You don't need any further plugins, you have to use normal jquery function instead:
$("#yourdiv").scrollTop($("#yourdiv").prop("scrollHeight"));
Upvotes: 5