Preface
1:
Getting Started
2:
Selectors—How to Get Anything You Want
3:
Events—How to Pull the Trigger
4:
Effects—How to Add Flair to Your Actions
5:
DOM Manipulation—How to Change Your Page on Command
6:
AJAX—How to Make Your Site Buzzword-Compliant
7:
Table Manipulation
Free Chapter
8:
Forms with Function
9:
Shufflers and Rotators
10:
Plug-ins
Appendix A:
Online Resources
Appendix B:
Development Tools Appendix C:
JavaScript Closures
IndexLatest Updates
Free Chapter:
Chapter 7:
Table Manipulation [1.31 MB PDF]
Contact
us |
Chapter 3:
Events—How to Pull the Trigger
Getting bigger, pull the trigger
—Devo,
"Puppet Boy"
JavaScript has several built-in ways of reacting to user interaction and other events. To make a page dynamic and responsive, we need to harness this capability so that we can, at the appropriate times, use the jQuery techniques we have learned so far. While we could do this with vanilla JavaScript, jQuery enhances and extends the basic event handling mechanisms to give them a more elegant syntax while at the same time making them more powerful.
|
Chapter
3: Events—How to Pull the Trigger
-
Performing Tasks on Page Load
- Timing of Code Execution
- Multiple Scripts on One Page
- Shortcuts for Code Brevity
-
Simple Events
- A Simple Style Switcher
- Enabling the Other Buttons
- Event Handler Context
- Further Consolidation
- Shorthand Events
-
Compound Events
- Showing and Hiding Advanced Features
- Highlighting Clickable Items
- The Journey of an Event
- Side Effects of Event Bubbling
-
Limiting and Ending Events
- Preventing Event Bubbling
- Event Targets
- Stopping Event Propagation
- Default Actions
- Removing an Event Handler
-
Simulating User Interaction
-
Summary
|
|
Paperback 380 pages
Released: July 2007
ISBN: 1847192505
ISBN 13:
978-1-847192-50-9 |
|
|
|
|