Robson Silveira
Robson Silveira

Reputation: 125

Is there a way to make a jquery animate opacity not use a lot of CPU?

I've made a button with mouseenter(opacity:0.6) and mouseleave(opacity:1), it uses only 6% of cpu when running on Firefox or Chrome but in IE8 it uses 35% 42% ...

Is there some way to make it not use a lot of CPU in IE?

Upvotes: 0

Views: 104

Answers (2)

GoldenNewby
GoldenNewby

Reputation: 4452

It seems like you can try a different "Easing" string to indicate which method of animation you want to use. My guess would be that Linear would be less intensive than the default "swing". It also mentions being able to use mentions being able to use plugins to use other "Easing" methods. It's possible there are less intensive methods of doing the animation. You can also try decreasing the duration or span of opacities that must be covered.

http://api.jquery.com/animate/

Upvotes: 0

Ilia Frenkel
Ilia Frenkel

Reputation: 1977

IE8 is fairly old browser. You have three options:

  1. Don't use IE.
  2. Don't use opacity in IE.
  3. Use images instead of opacity.

Upvotes: 1

Related Questions