Had a look around and couldn’t find an answer. I need to add the duration of animation to this code:
$('a:has(.image-active)').hover(function() {
$('.image-active', this).stop().animate({"opacity": 1});
},function() {
$('.image-active', this).stop().animate({"opacity": 0});
});
However, I can’t work out where to place the duration. Just now it fades in to 1 and fades out to 0 which must be the default for jQuery.
Pass the duration as the second parameter to animate(), for ex:
or