How to add elements to jquery animation, one by one?
Hello,
I'm creating a web page composed of wheels looping with mouseover. I succeeded to start only the selected wheel but now I want to loop another wheel, and another etc...while the others wheels (which are already looping) still work.
<script>
$(document).ready(function(){
$("#image1").mouseover (function(){
$(function() {
var $rota = $("#image1"),
degree = 0, // modifier angle
timer;
function rotate() {
$rota.css({ transform: 'rotate(' + degree + 'deg)'});
// timeout increase degrees:
timer = setTimeout(function() {
++degree;
rotate(); // loop it
},25); // vitesse
}
rotate(); // run it!
});
});
});
</script>
I don't know how to add
exponentially others wheels.
Thanks for your answers :)