this() is selecting multiple objects
Hi! I am very new to this and I have a question. I don't know if I am formulating this the right way but here it goes. I am making a website. There is a class of images that are repeated all over the website. When you go over one of them with your mouse, it changes to another image. When you go over the changed ones again they change to a third image. Except that this last step is a gif and when you go over one of them with your mouse all of them play synchronized instead of just the one I have my mouse over. I hope this makes sense:
$('.eyes').append('<img class="singleEye" src="images/open.png"/></div>');}
$('.singleEye').mouseenter(function(){
$(this).attr('src', 'images/close.png'); //substitute html with what I say here */
$(this).addClass('closed');
$('.closed').mouseenter(function(){
$(this).attr('src', 'images/anim1.gif');
});
}); //close loop
Thank you for your help