Jquery Remove All Event Handlers Inside Element

后端 未结 3 517
臣服心动
臣服心动 2020-12-10 00:43

I have a div element with several elements inside it like buttons and so forth which have event handlers attached to them. I know its possible to go:

$(\"#bu         


        
3条回答
  •  臣服心动
    2020-12-10 01:23

    Try with

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

    Or:

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

    if you're talking about

提交回复
热议问题