【发布时间】:2011-02-01 22:56:03
【问题描述】:
我有一些简单的代码,例如:
$('#modal-buttons [href*=close]').bind('click.modalClose',function(){
app().modal('close')
});
但是假设我不知道 click.modalClose 将被绑定的任何地方,有没有办法销毁所有这些特定绑定,无论元素是什么,而不必执行以下操作?
$('#modal-buttons [href*=close],.someOtherelement,#onemore,.another').unbind('click.modalClose');
【问题讨论】:
标签: javascript jquery events bind jquery-events