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

查看所有标签

Ruby Cookbook

Ruby Cookbook

Lucas Carlson、Leonard Richardson / O'Reilly Media / 2006-7-29 / USD 49.99

Do you want to push Ruby to its limits? The "Ruby Cookbook" is the most comprehensive problem-solving guide to today's hottest programming language. It gives you hundreds of solutions to real-world pr......一起来看看 《Ruby Cookbook》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

SHA 加密
SHA 加密

SHA 加密工具