This is a migrated thread and some comments may be shown as answers.

scroll modal to top

2 Answers 174 Views
ModalView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 11 Nov 2013, 08:07 PM
We have a modal view that has content loaded into it dynamically via some ajax calls. After the data is loaded and the modal is made visible, the scroll bar is always still at the position it was for the previous content. How can we scroll it to the top after loading the content?

Thanks

2 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 12 Nov 2013, 04:35 PM
Hi Michael,

You can reset the scroller of the ModalView, so it will be automatically scrolled to the top. You can do this using the following code snippet:

$('#modalview-login').data('kendoMobileModalView').scroller.reset()

 Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Michael
Top achievements
Rank 1
answered on 12 Nov 2013, 05:14 PM
perfect, thank you.
Tags
ModalView
Asked by
Michael
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Michael
Top achievements
Rank 1
Share this question
or