Jump to content

Js Animations Obsolete?


Stefany93

Recommended Posts

Hi there,

 

I was turning the pages of a JS book the other day and I stumbled upon JS animations. I am wondering, with the invention of CSS3, does it make using scripted animations deprecated since it is way faster to use CSS instead, or CSS still can't do what JS can?

 

Thank you.

 

Best Regards

Stefany

Link to comment
https://forums.phpfreaks.com/topic/270390-js-animations-obsolete/
Share on other sites

  On 11/7/2012 at 3:59 AM, Volter9 said:

There's in CSS3 you can find transformations for elements but the problem is that you can't to control them.

There's advice: better use ready JQ or JQ UI plugins/JS solutions.

 

Just to be on the safe side, JQ means jQuery, right?

As mentioned CSS3 gives you transformations, which are (with a few caveats) hardware accelerated. That means they'll out perform any JS-based animation. So yeah, in the future, JS animations will become obsolete. Right now though it's the same old story; not enough browsers support them to drop the legacy way completely.

 

  Quote
the problem is that you can't to control them.

 

What do you mean you can't control them? It's perfectly possible to control them.

  On 11/9/2012 at 4:27 PM, Adam said:

As mentioned CSS3 gives you transformations, which are (with a few caveats) hardware accelerated. That means they'll out perform any JS-based animation. So yeah, in the future, JS animations will become obsolete. Right now though it's the same old story; not enough browsers support them to drop the legacy way completely.

 

 

 

What do you mean you can't control them? It's perfectly possible to control them.

 

 

Right, so for now it is better to make animations with JS than with CSS since most of the browsers won't support it while JS has been supported for years.

I got it.

Recently I read that you no longer need to enclose your JS code with HTML comments for browser comparability, every browser support JS now which is awesome.

  Quote
Right, so for now it is better to make animations with JS than with CSS since most of the browsers won't support it while JS has been supported for years.

I got it.

 

Nope. It's better to use CSS where possible, and fall back to Javascript when not. Assuming you're willing to implement it twice that is.

 

  Quote
Recently I read that you no longer need to enclose your JS code with HTML comments for browser comparability, every browser support JS now which is awesome.

 

I haven't worried about putting comments in for a long time now.

  On 11/11/2012 at 7:26 PM, Adam said:

Nope. It's better to use CSS where possible, and fall back to Javascript when not. Assuming you're willing to implement it twice that is.

 

 

 

I haven't worried about putting comments in for a long time now.

 

 

Right, thank you very much. So use CSS when possible and when not then JS.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.