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

Any way to get the current page from the scrollview widget?

2 Answers 252 Views
ScrollView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Veteran
Ron asked on 15 May 2012, 02:09 AM
In what way do I query the current page shown by the scrollview widget from Javascript?

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 16 May 2012, 02:49 PM
Hi Ron,

The Kendo UI Mobile ScrollView exposes the page field and you could access the current one via the page option. For example: 
<div data-role="scrollview" id="scrollview" data-page="2">
   <div class="photo photo1" data-role="page"></div>
   <div class="photo photo2" data-role="page"></div>
   <div class="photo photo3" data-role="page"></div>
   <div class="photo photo4" data-role="page"></div>
   ....
</div>
   ....
<script>
   ....
   var scrollView = $("#scrollview").data("kendoMobileScrollView");
   scrollView.page;
</script>


Greetings,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ron
Top achievements
Rank 1
Veteran
answered on 16 May 2012, 02:51 PM
Thanks. Just noticed it in the documentation this morning. Do not think it was there before.

Ron.
Tags
ScrollView (Mobile)
Asked by
Ron
Top achievements
Rank 1
Veteran
Answers by
Iliana Dyankova
Telerik team
Ron
Top achievements
Rank 1
Veteran
Share this question
or