-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
jQuery 1.4 Reference Guide
The following methods are the building blocks of jQuery's event handling module.
Attach a handler to an event for the elements.
.bind(eventType[, eventData], handler)
eventType: A string containing one or more JavaScript event types such as click, submit, or custom event names
eventData (optional): A map of data that will be passed to the event handler
handler: A function to execute each time the event is triggered
The jQuery object, for chaining purposes.
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.
The jQuery library provides shortcut methods for binding the standard event types such as .click() for .bind('click'). Details of each event type can be found in the Description of its shortcut method.
Any string is legal for eventType. If the string is not the name of a native JavaScript event, then the handler...
Change the font size
Change margin width
Change background colour