Reputation: 646
I've built a simple jQuery animated accordion menu using the slideUp and slideDown functions (also tried it with slideToggle) and while it looks great it the animation is perfectly smooth even though all accordion menu elements are the same height. As you can see, even here on jQueryUIs example, when you click an element, the bottom of the menu rises a little bit and then settles back after the animation completes. I assume this has to do with a slight timing difference in the animations but even setting a delay doesn't fix the issue. Anyone know I way to smooth out this issue? It's important since the site I'm working on is essentially one giant accordion menu so the issue becomes very noticeable.
Upvotes: 1
Views: 534
Reputation: 719
My 2c:
I assume that you want to avoid the jittery below the accordion where the entire page shuffles down and up. Am I in the right path? If so, I would study the behaviour and adjust the holding div to a fixed height giving it either 1, 2, 3 extra px on the bottom.
I too have noticed that "problem" in my applications in general.
Upvotes: 2