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));