scroll modal to top

3 posts, 1 answers
  1. Answer
    Michael
    Michael avatar
    151 posts
    Member since:
    Jan 2012

    Posted 11 Nov 2013 Link to this post

    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. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 12 Nov 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Michael
    Michael avatar
    151 posts
    Member since:
    Jan 2012

    Posted 12 Nov 2013 Link to this post

    perfect, thank you.
Back to Top