我不知道如何可以用jQuery on()
jQuery live()已棄用:使用on for mouseenter和mouseout?
$('.box').live({
mouseenter:
function() {
$(this).children('.menu').stop(true, true).fadeIn(fadeIn);
},
mouseleave:
function() {
$(this).children('.menu').stop(true, true).fadeOut(fadeOut);
}
});
任何想法改寫下面聽衆?
請參閱http://stackoverflow.com/questions/8021436/jquery-1-7-turning-live-into-on和文檔http://api.jquery.com/live/,http:// api .jquery.com /上/。你會發現如何將'.live'轉換爲'.on'的信息。 – 2012-07-19 11:11:09