鼠标滑过改变图片
jQuery中attr()函数不支持delay函数控制延迟,把attr函数加在animate的回调函数中
jQuery(function(){
jQuery('.avia_p_w_picpath').hover(
function() {
urlss = jQuery(this).attr("src").replace("1.jpg","2.jpg");
jQuery(this).stop().animate({opacity: '0.3'},100, function(){jQuery(this).attr("src",urlss);});
jQuery(this).delay(101).animate({opacity: '1'},100);
},
function() {
urltt = jQuery(this).attr("src").replace("2.jpg","1.jpg");
jQuery(this).stop().animate({opacity: '0.3'},100,function(){jQuery(this).attr("src",urltt);});
jQuery(this).delay(101).animate({opacity: '1'},100);
});
}(jQuery));
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。