Skip to content
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

"Go to Top" of a div on which jquery-endless-scroll is used #41

Open
tgpraveen opened this issue Dec 10, 2013 · 0 comments
Open

"Go to Top" of a div on which jquery-endless-scroll is used #41

tgpraveen opened this issue Dec 10, 2013 · 0 comments

Comments

@tgpraveen
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant