我有一个简单的 jquery 函数,它在图像悬停时淡入淡出:
if($(".portfolioThumbs").length>0){
$(".magnify").css("opacity","0");
$(".magnify").hover(function(){$(this).stop().animate({opacity:1},"slow")},function() {$(this).stop().animate({opacity:0},"slow")}
)};
如何在移动设备上获得同样的效果?我在某处读到你可以使用“touchstart”和“touchend”——如果是这样,我怎么能把它结合到这个函数中?
谢谢!