css('animation-iteration-count', 5) doesn't apply style to element #2792
|
Goto #2793 to see how to fix that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
|
Goto #2793 to see how to fix that |
When I use
css('animation-iteration-count', 5)I expect element hasstyle="-webkit-animation-iteration-count: 5;"(this vendor prefix is just a example), but it doesn't.So I debug jQuery.js, I found when I use
css('animation-iteration-count', 5)actually becomestyle[ 'WebkitAnimationIterationCount' ] = 5 + 'px'.Browser consider it a illegal value, because
animation-iteration-countonly acceptinfinite | <number>, so this style don't have effect.This is a reproduceBug demo
So that
cssNumbershoud addanimationIterationCountproperty to prevent automatically add "px" to the value.