ComputerWolf / SlickNav

Responsive Mobile Menu Plugin for jQuery
MIT License
941 stars 315 forks source link

is there any chance to use CSS transitions instead of animating CSS? #8

Closed marcinciarka closed 10 years ago

marcinciarka commented 10 years ago

Hello,

This plugin is great, I configured it in about... 5 minutes? It's working perfectly. But it uses default jQuery slideDown/Up and it is not hardware accelerated in phones/tablets. The result is choppy animations.

Why won't you use jQuery Mobile slideDown/Up which is utilizing CSS transitions and working smoothly on phones and tablets?

Sry for my bad english, I try really hard :)

Regards

ComputerWolf commented 10 years ago

@dreszczyk, thanks for your comment. An attempt has already been made to use CSS3 transformations instead of jquery. However, jquery mobile only uses CSS transitions for page transitions, not animations on divs. I did use Transit (http://ricostacruz.com/jquery.transit/) for the animations and it did not seem to have much of a performance increase. Please visit http://slicknav.com/css3demo and let me know if there is any difference for you.

marcinciarka commented 10 years ago

@ComputerWolf thanks for your reply. I ran the css3demo on my Galaxy Nexus (4.4, Chrome) and did't see any changes really...

ComputerWolf commented 10 years ago

@dreszczyk, unfortunately that while the animations are using CSS3 in the demo, height manipulations are not hardware-accelerated on mobile. That is why both seem to function the same. If it were possible to translate the elements instead of changing their height it would be hardware-accelerated, but that would be sort of hacky and would require a major rewrite.

marcinciarka commented 10 years ago

That's very inconvenient... I prefer no animations then :< Thanks.