vendredi 20 février 2015

How can I make my image rotation script pause when I hover with JavaScript?

I need the image to pause when I mouse over it. I have no experience with JavaScript so anything would help me!



function rotateImage() {
$('#myImage').fadeOut('fast', function() {
$(this).attr('src', images[index]);

$(this).fadeIn('fast', function() {
if (index == images.length - 1) {
index = 0;
} else {
index++;
}
});
}

Aucun commentaire:

Enregistrer un commentaire