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

3 posts, 0 answers
  1. Ron
    Ron avatar
    122 posts
    Member since:
    Sep 2011

    Posted 14 May 2012 Link to this post

    In what way do I query the current page shown by the scrollview widget from Javascript?
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2594 posts

    Posted 16 May 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Ron
    Ron avatar
    122 posts
    Member since:
    Sep 2011

    Posted 16 May 2012 Link to this post

    Thanks. Just noticed it in the documentation this morning. Do not think it was there before.

    Ron.
Back to Top