Page 1 of 1
CSS3 "animate-play-state:;"
Posted: Sat Jun 11, 2011 2:25 pm
by Pazuzu156
I'm working with CSS3 messing with Animations, etc. I'm using JavScript to enable play/pause, the syntax is
Code: Select all
object.style.animatePlayState="play|paused";
I want to be able to use a javascript function that can toggle this when they click the object, how would I go about doing this?
Re: CSS3 "animate-play-state:;"
Posted: Sun Jun 12, 2011 1:51 am
by getmizanur
use javascript framework such jquery and prototype
Re: CSS3 "animate-play-state:;"
Posted: Sun Jun 12, 2011 6:38 pm
by Eran
That values are actually "running|paused". The function would look something like:
Code: Select all
function toggleAnimation(el) {
el.style.animatePlayState = el.style.animatePlayState == 'paused' ? 'running' : 'paused';
}
Keep in mind that this property might be removed from the spec soon, see notes on
https://developer.mozilla.org/en/CSS/an ... play-state
Re: CSS3 "animate-play-state:;"
Posted: Thu Jul 07, 2011 11:17 am
by financrisval
This forum is very informative regarding coding. Maybe I can learn a lot here.
