寻找 jQuery 事件类型的完整列表 [英] Looking for a full list of jQuery event types

查看:35
本文介绍了寻找 jQuery 事件类型的完整列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里可以找到所有 jQuery 支持的事件(如 clickmouseup 等)的完整列表,并在触发时提供一些说明?我正在寻找那些可以绑定的:

Where I can find a complete list of all jQuery supported events (like click, mouseup etc) with some explanations when they are triggered? I am looking for those that can be binded:

$('#foo').bind('click', handler);

例如,我偶然发现有 paste 事件,但我在他们的文档中找不到任何对它的引用.还有什么?

For example I just found out by accident that there is paste event but I can't find any references to it anywhere in their docs. What else is there?

推荐答案

一个非详尽列表位于 http://api.jquery.com/category/events/.通过 .bind().live() 支持更多的 DOM 事件.这些函数可以为任何标准 DOM 事件分配处理程序,其中大部分与兼容性表一起在 http 中列出://www.quirksmode.org/dom/events/

A non exhaustive list is at http://api.jquery.com/category/events/. There are more DOM events supported through .bind() and .live(). Those functions can assign a handler to any standard DOM event, most of which are listed along with compatibility tables at http://www.quirksmode.org/dom/events/

.bind() 方法是将行为附加到文档的主要方法.eventType 允许所有 JavaScript 事件类型,例如焦点、鼠标悬停和调整大小.

The .bind() method is the primary means of attaching behavior to a document. All JavaScript event types, such as focus, mouseover, and resize, are allowed for eventType.

<小时>

从 jQuery 1.7 开始,您应该使用 .on() 代替 .live().bind().

这篇关于寻找 jQuery 事件类型的完整列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆