Scroll in Collapsible div

6 posts, 0 answers
  1. Robby Parker
    Robby Parker avatar
    18 posts
    Member since:
    Jul 2012

    Posted 16 Aug 2015 Link to this post

    I have a stack of divs with data-role="collapsible" and I'm trying to get an auto-scroll to work in the data-expand event. I can't seem to figure out how to do this. Basically, I just want to auto scroll the div to top of the current view minus 100px. Any ideas on how to do this? I've spent hours trying to figure this out.
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 19 Aug 2015 Link to this post

    Hello Robby,

    This help topic explains how to create scrollable collapsible content. In case you want to automatically scroll the content you may use mobile scroller API methods - scrollTo or animatedScrollTo.

    Regards,
    Alexander Valchev
    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. Robby Parker
    Robby Parker avatar
    18 posts
    Member since:
    Jul 2012

    Posted 19 Aug 2015 in reply to Alexander Valchev Link to this post

    Thanks. I would like to do my own animation with duration and easing via JQuery but can't figure that out either. I don't like your animateScrollTo because it's so fast, you can't really see the animation. My first shot was somthing like this, although I barely expected it to work:

    kendo.mobile.application.scroller().animate({ scrollTop: -20 }, 1000);

    You get the idea, though. Any thoughts on how to override and set my own animation on the scroll? Thanks.

  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 21 Aug 2015 Link to this post

    Hi Robby,

    Mobile Scroller does not support jQuery UI animations. The animatedScrollTo method determines scrolling speed automatically based on the content height.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Robby Parker
    Robby Parker avatar
    18 posts
    Member since:
    Jul 2012

    Posted 21 Aug 2015 in reply to Alexander Valchev Link to this post

    OK, thanks. You should really think about adding the ability for us to specify duration and easing of the animatedScrollTo method. It would be most helpful to control that experience.
  7. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 25 Aug 2015 Link to this post

    Hi Robby,

    Thank you for the feedback. My suggestion is to submit this at Kendo UI UserVoice portal.
    In this way other users will be able to evaluate and vote for this idea. The more votes it collects the higher priority it will have when we build the next roadmap.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready