Event propogation can save you a lot of time by letting you capture an…event on a parent element instead of…having to register events for individual item.…But on occasion, you may want to have…an event stop propagating through the dom chain.…We can do that with the stopPropagation () method.…Now if you're trying to support older versions of IE, you would…do this by setting the cancelbubble property to true for those browsers.…Now let's see how this is done.…So if we take a look at our page right now, and we…click on this pink item right here, you'll notice that it's registering two events.…
And it's registering them in the capturing face, so they…clicked and said the UL happens first and then pink.…So let's go into our code, and first you want to change these two elements.…To bubble instead of capture.…So, I'm going to change the true right here to false.…It'll be compatible with more browsers this way.…And we want to add…the stop propagation method onto the event right after we log the event.…So, save and go back into our page and refresh and notice…
Author
Released
9/17/2013- Understanding event registration and propagation
- Analyzing event properties
- Creating and removing DOM elements with events
- Removing an event
- Canceling and preventing default events
- Playing media events
- Handling media pauses
- Dragging and dropping
- Adding touch events
Skill Level Intermediate
Duration
Views
Related Courses
-
Outlook 2003 Essential Training
with David Rivers5h 45m Beginner -
Access 2003 Essential Training
with Mark Swift4h 55m Beginner -
Excel 2007 Essential Training
with Lorna Daly5h 13m Beginner -
PowerPoint 2007 Essential Training
with David Rivers6h 29m Beginner -
Publisher 2007 Essential Training
with David Rivers5h 47m Beginner -
Visio 2007 Essential Training
with David Rivers8h 55m Intermediate -
Outlook 2007 Essential Training
with Sean Conrad2h 37m Beginner -
Project 2007 Essential Training
with Lorna Daly3h 59m Beginner -
Access 2007 Essential Training
with David Rivers5h 27m Beginner -
SharePoint 2007 Essential Training
with David Rivers7h 48m Beginner -
Getting Started with Apple Color
with Robbie Carman1h 10m Beginner -
Acrobat 9 Pro: Creating Forms
with Brian Wood8h 37m Intermediate -
Acrobat 9 Pro Essential Training
with Brian Wood9h 34m Beginner -
Artist Series with Hillman Curtis
with Hillman Curtis51m 13s Intermediate -
Creative Inspirations: Margo Chase, Graphic Designer
with Margo Chase1h 18m Intermediate -
Margo Chase's Hand-Lettered Poster: Start to Finish
with Margo Chase14m 21s Intermediate -
Creative Inspirations: Ron Crabb, Digital Illustrator
with Ron Crabb1h 25m Intermediate -
Troika's ABC Brand Campaign: Start to Finish
with Troika Design Group21m 32s Intermediate -
CSS Positioning Best Practices
with Bill Weinman2h 32m Intermediate -
Creative Inspirations: Rick Smolan, Photographer
with Rick Smolan1h 19m Intermediate -
Learning GREP with InDesign
with Michael Murphy3h 45m Intermediate -
Mixing and Mastering with Pro Tools
with Brian Lee White9h 18m Intermediate -
Video Journalism: Shooting Techniques
with Jeff Sengstack2h 4m Intermediate -
Premiere Pro: Color Correction and Enhancement
with Jeff Sengstack5h 6m Intermediate -
Excel 2007: Financial Analysis
with Curt Frye2h 18m Intermediate -
Designing a Book Cover
with Nigel French2h 46m Intermediate -
Screencasting with the Mac
with Christopher Breen1h 51m Beginner -
Creative Inspirations: Ze Frank, Comedic Digital Savant
with Ze Frank56m 1s Intermediate -
Excel 2007: Pivot Tables for Data Analysis
with Curt Frye2h 45m Intermediate -
Excel 2007: Introduction to Formulas and Functions
with Curt Frye2h 26m Intermediate -
Windows 7 Essential Training
with David Rivers6h 31m Beginner -
Excel 2007 Power Shortcuts
with Michael Ninness2h 4m Intermediate -
Photo Assignment: Group Shots
with Derrick Story36m 11s Beginner
-
Introduction
-
Introduction1m 2s
-
-
1. Learning about Events
-
Stopping event propagation1m 34s
-
Cancelling default behavior2m 49s
-
2. Working with Common Events
-
Cleaning up event issues7m 11s
-
Removing an event5m 58s
-
3. Working with Time-Based Events
-
Playing media events8m 53s
-
Handling media pauses5m 4s
-
Starting a new song8m 6s
-
4. JavaScript: Events in Action
-
What we'll be building1m 5s
-
Preparing SVG assets2m 50s
-
Setting up our core files7m 45s
-
Starting to drag6m 44s
-
Dragging and dropping4m 8s
-
Dealing with layers3m 13s
-
Adding touch events9m 6s
-
-
Conclusion
-
Next steps1m 37s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Stopping event propagation