语言

Menu
Sites
Language
How to scroll to top of scrollable div ?

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

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

1 回复
Jean-Philippe Vignolo
Ok, it looks like a bug with a Jira opened for it : https://bugs.tizen.org/jira/browse/TWEB-112 It also explains a workaround that does the job.