我使用下面的代码在悬停时交换图像:
$(function() {
$("#compost").hover(function() {
origImage=$(this).attr("src");
$(this).attr("src", "images/order-compost-over.gif")
},function() {
$(this).attr("src", origImage)
});
});
我正在尝试使用 fadeIn 而不是交换。我尝试使用它,但没有成功。我尝试使用 img 标签 fadeIn 但它不起作用。
最佳答案
查看ImageSwitch 。满足您想要的一切,甚至更多。
关于jquery - 图像交换技术 - 淡入淡出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/770806/