Hi…
The following code snippet is used for swapping images during a hover event. The code functions as intended…but I’m trying to add a fadeIn/fadeOut transition during the hover event. I’ve attempted to accomplish this by using CSS3 transitions…but would prefer to stick with jquery. If anyone could suggest a method for doing this…I would much appreciate it. Thanks.
Code:
$('img').hover(function () {
$(this).attr({
src: $(this).attr('data-src'), 'data-src': $(this).attr('src')
});
});