$('.imgc').hover(
function(e) {
$(this).effect("bounce", { times:5 }, "slow");
},
function(e) {
$(this).unbind('mouseenter');
});
我需要對圖像設置一個效果。但是我需要這種效果只能一次工作。但是之後我需要在mouseout上再次綁定。但它不起作用。如何解除綁定然後再綁定?
('.imgc').bind('mouseenter', e);
我該怎麼做?
爲什麼不使用http://api.jquery.com/on/和http://api.jquery.com/off/作爲'bind'和'unbind'已被棄用 – exexzian
我想如果你解釋一下更多你正在尋找的東西,你不應該需要解除事件 –
請嘗試http://api.jquery.com/one/ – Stefan