You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there some obvious way, maybe some feature of the plugin, to go to top of a div on which I have jquery-endless-scroll applied.
Currently, I was trying something like:-
function backToTop() {
alert("I am here.");
var deviceList = $("#list");
var scrollPosition = deviceList.scrollTop();
alert("scrollPosition:- "+scrollPosition);
deviceList.scrollTop = 0;
}
And, I have used this plugin successfully on #list. But, the above code which is mapped to a button’s onClick() gives me the scroll scrollPosition value in the alert but the “deviceList.scrollTop = 0;” line doesn’t seem to have any effect.
Any ideas?
The text was updated successfully, but these errors were encountered:
Hi,
Is there some obvious way, maybe some feature of the plugin, to go to top of a div on which I have jquery-endless-scroll applied.
Currently, I was trying something like:-
function backToTop() {
alert("I am here.");
var deviceList = $("#list");
var scrollPosition = deviceList.scrollTop();
alert("scrollPosition:- "+scrollPosition);
deviceList.scrollTop = 0;
And, I have used this plugin successfully on #list. But, the above code which is mapped to a button’s onClick() gives me the scroll scrollPosition value in the alert but the “deviceList.scrollTop = 0;” line doesn’t seem to have any effect.
Any ideas?
The text was updated successfully, but these errors were encountered: