我想在第一次单击后取消绑定锚点,但是当用户单击特定按钮时,我想将单击事件重新绑定到该锚点
我写了这段代码
$(document).ready(function(){
$("a.package").click(function(){
//alert('click');
$(this).unbind('click');
// the rest of the code
});
$('#activate').click(function(){
$('a.package').bind('click');
// the rest of the code
});
});
unbind功能很好,但是bind功能不行,为什么?以及如何使其工作?