Handling events

You can still use any jQuery event you might need, but chances are you are looking forward to providing a better user experience to mobile users.

In order to enhance the performance of mobile-browsing, jQuery Mobile adds a new set of events which are mobile-specific and are based upon native events.

The custom set of events behaves no differently as any other jQuery event would, and can be bound to them with either bind() or live().


Bind or live?

Both events are used for a similar purpose, which is attaching a handler to an event for the elements which match the current selector. The only difference is that live() attaches the handler to the elements matching the current selector that will be created in the future.

This is to say, ...

Get jQuery Mobile First Look now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.