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

Scroll in Collapsible div

5 Answers 97 Views
Collapsible
This is a migrated thread and some comments may be shown as answers.
Robby Parker
Top achievements
Rank 1
Robby Parker asked on 16 Aug 2015, 11:50 PM
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.

5 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 19 Aug 2015, 07:47 AM
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!
 
0
Robby Parker
Top achievements
Rank 1
answered on 19 Aug 2015, 07:07 PM

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.

0
Alexander Valchev
Telerik team
answered on 21 Aug 2015, 11:45 AM
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!
 
0
Robby Parker
Top achievements
Rank 1
answered on 21 Aug 2015, 03:03 PM
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.
0
Alexander Valchev
Telerik team
answered on 25 Aug 2015, 08:18 AM
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!
 
Tags
Collapsible
Asked by
Robby Parker
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Robby Parker
Top achievements
Rank 1
Share this question
or