jQuery undelegate() 方法

jQuery 教程 · 2019-03-26 22:44:24

实例

通过 delegate() 方法从所有元素移除所有事件处理程序:

$("body").undelegate();

定义和用法

undelegate() 方法移除一个或多个由 delegate() 方法添加的事件处理程序。

自 jQuery 版本 1.7 起,on() 和 off() 方法是添加和移除元素上的事件处理程序的首选方法。

语法


$(selector).undelegate(selector,event,function)

参数 描述
selector 可选。规定需要删除事件处理程序的选择器。
event 可选。规定需要删除处理函数的一个或多个事件类型。
function 可选。规定要删除的具体事件处理函数。

点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html

查看所有标签

Producing Masculinity

Producing Masculinity

Michele White / Routledge / 2019-3 / $39.95

Thoughtful, witty, and illuminating, in this book Michele White explores the ways normative masculinity is associated with computers and the Internet and is a commonly enacted online gender practice. ......一起来看看 《Producing Masculinity》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具