Structure:
.parent (has if/else to toggle on click) -> .child (has nothing)
Parent 2条回答 佛祖请我去吃肉 (楼主) 2020-12-09 05:47 Use event.stopPropagation();: $('#a').add('#b').click(fun1); function handler(event) { event.stopPropagation(); // now do your stuff } 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
Use event.stopPropagation();:
event.stopPropagation();
$('#a').add('#b').click(fun1); function handler(event) { event.stopPropagation(); // now do your stuff }