Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery: Animate using CSS3 instead of JavaScript

I'm converting a jQuery-based web application for use on iPad and need to make use of the hardware-accelerated performance of CSS3 animations. I'm already using fadeIn, fadeOut and some positioning animation so ideally I'd like a plugin which overrides these functions to make use of CSS3 without me having to change the core functionality.

I've searched around but can't find anyone that has tackled this problem, so I'm considering writing a plugin myself, but I wanted to make sure someone else hadn't already done it.

Any feedback would be greatly appreciated!

like image 353
Nick Boyce Avatar asked Mar 23 '11 17:03

Nick Boyce


People also ask

Can we do animation using only CSS without using JavaScript or jQuery?

CSS allows animation of HTML elements without using JavaScript or Flash! In this chapter you will learn about the following properties: @keyframes. animation-name.

Is it better to animate with CSS or JavaScript?

TL;DR # Use CSS animations for simpler "one-shot" transitions, like toggling UI element states. Use JavaScript animations when you want to have advanced effects like bouncing, stop, pause, rewind, or slow down.

Does css3 animation need JavaScript?

CSS animations make it possible to do simple animations without JavaScript at all. JavaScript can be used to control CSS animations and make them even better, with little code.

Can the jQuery animate () method be used to animate any CSS property?

The animate() method is typically used to animate numeric CSS properties, for example, width , height , margin , padding , opacity , top , left , etc. but the non-numeric properties such as color or background-color cannot be animated using the basic jQuery functionality. Note: Not all CSS properties are animatable.


1 Answers

How about checking out http://playground.benbarnett.net/jquery-animate-enhanced/

like image 152
jpea Avatar answered Oct 12 '22 23:10

jpea