Jquery Remove All Event Handlers Inside Element

一笑奈何 提交于 2019-11-28 09:37:52

jQuery will do the looping for you for just the direct children:

$("#div1").children().off();

or if you want all descendants:

$("#div1").find("*").off();

Does this help:

$("#div1").find('*').off();

Try with

$("#div1 >* ").off();

Or:

$("#div1").find('button').off();

if you're talking about <button> elements

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!