I use this code below to replace the image on hover:
$(function() {
$("#compost").hover(function() {
origImage=$(this).attr("src");
$(this).attr("src", "images/order-compost-over.gif")
},function() {
$(this).attr("src", origImage)
});
});
I am trying to use fadeIn instead of swap. I tried to work, but no luck. I tried using img tag fadeIn but it did not work.
source
share