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://www.codercto.com/courses/l/35.html

查看所有标签

Dive Into Python 3

Dive Into Python 3

Mark Pilgrim / Apress / 2009-11-6 / USD 44.99

Mark Pilgrim's Dive Into Python 3 is a hands-on guide to Python 3 (the latest version of the Python language) and its differences from Python 2. As in the original book, Dive Into Python, each chapter......一起来看看 《Dive Into Python 3》 这本书的介绍吧!

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

RGB HEX 互转工具

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

在线XML、JSON转换工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换