I created a plugin called Bootstrap Notify. Which I recommend using Animate.css to control the animations of the notifications. Someone reported an issue with Glyphicons Pro where the notification would repeat the animate enter and exit animations by Animate.css. It was recently brought to my attention that the cause of this issue is because both Animate.css and Glyphicons Pro use a similar class called animated
.
Animate.css does not set animation-iteration-count
so it defaults to 1
whereas Glyphicons Pro sets animation-iteration-count
to infinite
.
I am trying to force my plugin to set animation-iteration-count
to 1
so that the notification will not repeat it's animation over and over again. I am using jQuery to set the css of the notification.
I tried to use
var css = {
animationIterationCount: 1
}
I have also tried
var css = {
WebkitAnimationIterationCount : 1,
animationIterationCount: 1
}
then later I set the notify css
$notify.css(css)
But if I inspect the notification on the website I notice that the animation-iteration-count
is not set.
Just figured out that if I set it using JavaScript instead of jQuery it appears to work just fine.
For example the following works:
$notify[0].style.WebkitAnimationIterationCount = 1;
$notify[0].style.animationIterationCount = 1;
So my question is, Can you set animation-iteration-count
using jQuery and if you can how do you set it?