我的页面上有 p
元素。
此 p
有 2 次绑定(bind)点击(请保持这种状态。我知道还有其他选项。)
$('p').click (function (e) {
e.preventDefault(); //<== not helping me as I thought it should
alert('1');
});
//...later on the same page...
$('p').click (function ( ) {
alert('2');
});
我希望第一个代码能够阻止执行第二个代码(不通过标志)
最优雅
的做法是什么?
最佳答案
关于jquery - 阻止其他注册的点击事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8027904/