O'Reilly logo

Learning jQuery Third Edition by Karl Swedberg, Jonathan Chaffer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Event methods

In order to react to user behavior, we need to register our handlers using these event methods. Note that many DOM events only apply to certain element types; these subtleties are not covered here. Event methods are discussed in detail in Chapter 3.

Binding

Event Method

Description

.ready(handler)

Bind handler to be called when the DOM and CSS are fully loaded

.bind(type, [data], handler)

Bind handler to be called when the given type of event is sent to the element

.one(type, [data], handler)

Bind handler to be called when the given type of event is sent to the element; removes the binding when the handler is called

.unbind([type], [handler])

Remove the bindings on the element (for an event type, a particular ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required