-1

Does anyone have a link to a list of ALL events that can be passed to jQuery .on()?

Here are a few, but I cant seem to find a definitive list.

  • click
  • mouseenter
  • mouseleave
  • contextmenu (works on right click, and tap and hold with Android (not iOS))
  • focus
  • blur
  • focusin
  • focusout
  • scroll

I'm looking for Android/iOS touch events in particular.

Thanks!

EDIT 1: So I think the real question i'm asking is what events are standard across all browsers/devices?

4

6 回答 6

1

For touch screen devices you will have the following events:

  • touchstart
  • touchend
  • touchmove
  • touchcancel
于 2013-07-31T20:43:25.443 回答
1

I think you have to realise that the important question is not: What events can you pass to jQuery.on()? Because you can technically pass any event to that method.

The real question is, what events does the browser/device fire? Obviously, some events — as the ones you listed — are a standard, but some browsers will surprise you by not firing some events or by having their own custom events.

You can find a pretty extensive list at the MDN:

Events reference

But keep in mind that the point is that you can also define your own custom events, trigger them, and bind event listeners to them.

于 2013-07-31T20:48:35.293 回答
0

Are you using jQuery mobile? The events are listed here: http://api.jquerymobile.com/category/events/

于 2013-07-31T20:44:31.750 回答
0

Google DOM Events, get MDN Event Reference.

You may be particularly interested in the TouchEvent subclass.

Of course, you can bind any custom event using .on and trigger any custom event with .trigger, so the real answer is infinite.

于 2013-07-31T20:46:17.353 回答
0

You can register any event names. Whether they will be called is another question… Custom events can be manually triggered, and there are many that are triggered natively in the DOM. For some of them, jQuery has special shorthand methods.

I'm looking for Android/iOS touch events in particular.

Have a look at https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Events/Touch_events then, or the W3 spec.

于 2013-07-31T20:52:31.820 回答
0

All jQuery events. Here are lists of keyboard events and mouse events.

于 2013-07-31T20:59:51.020 回答