How to scroll to top of scrollable div ?
By Jean-Philippe Vignolo
10 Aug 2013 02:15
English
1 Replies
Hi,
I have a scrollable div like :
<div data-scroll="y" id="wrapper">blablabla scrollable content.</div>
It works well.
But latter in my javascript code I want to make it scroll back to top depending on a certain user action.
I tried both
$("#wrapper .ui-scrollview-view").scrollTop(0);
and
$("#wrapper").scrollTop(0);
but none is working...
What is the corect way to make it scroll to top ?
Regards
Jean-Philippe
Edited on 18 03, 2014
You must log in to use this service. Log in now?
The tag you entered already exists.
Do you want to report this post as spam?
The post has been reported as spam.
cannot be empty.
Are you sure you want to cancel and return to the list?
The code has been copied to the clipboard.
Enter a title.