how to unbind all event using jquery

后端 未结 4 1630
时光取名叫无心
时光取名叫无心 2020-12-02 10:46

i can use this code to remove click event,

$(\'p\').unbind(\'click\')

but , has some method to remove all event ?

has a method nam

4条回答
  •  误落风尘
    2020-12-02 11:36

    To remove all event bindings from all elements including document use :

    $(document).off().find("*").off();
    

提交回复
热议问题