I have this loader I've created using CSS3 and CSS3 Animations. Although, I want to use jQuery to create the actual loading function (depending on how many seconds I say.)
Example, I want so I can set it to ex. 30 seconds to load the bar to full.
Currently, I have this:
<div id="loader">
<div id="bar"></div>
</div>
#bar {
height: 20px;
width: 0px;
background: -webkit-linear-gradient(top, #4892D9, #1960BC);
background: -moz-linear-gradient(top, #4892D9, #1960BC);
background: -ms-linear-gradient(top, #4892D9, #1960BC);
background: -o-linear-gradient(top, #4892D9, #1960BC);
background: linear-gradient(top, #4892D9, #1960BC);
-webkit-box-shadow: 0 0 2px #000, inset 0 -7px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 30px rgba(63,137,205, 0.4);
-moz-box-shadow: 0 0 2px #000, inset 0 -7px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 30px rgba(63,137,205, 0.4);
box-shadow: 0 0 2px #000, inset 0 -7px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 30px rgba(63,137,205, 0.4);
-webkit-animation: progress 30s linear forwards;
-moz-animation: progress 2s linear forwards;
-ms-animation: progress 2s linear forwards;
animation: progress 2s linear forwards;
}
When the iFrame is loaded, I want to start the progress bar:
$('#iframe').load(function() {
//Code to start animation here
});
As you can see, the #bar have the css3 animation set to "2s". I want to be able to change this number through jQuery. How can I do that?