我一定错过了一些基本的东西,但对于我的生活来说,我无法解决它。
这个想法是当你点击那个点击事件然后解除绑定。还要注意 alert('test') 没有触发。
$(document).ready(function() {
$('#menu .cat-item a').each( function() {
$(this).bind('click',hide).unbind('click',hide);
});
});
function hide(){
alert('test')
$("#home-content").fadeIn();
$("#home-page").fadeOut();
}
使用 jQuery 1.4
非常感谢
担