Quantcast
Channel: Hover function in jQuery doesn't work - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by Stephan Muller for Hover function in jQuery doesn't work

$
0
0

You don't need to use each() on a collection of jQuery elements. You can simply use the following code to apply the hover to all of the element_links:

element_link.hover(  function(){$(this).siblings('img').animate({opacity:1}),250},  function(){$(this).siblings('img').animate({opacity:0.5}),250});

Viewing all articles
Browse latest Browse all 3