Home arrow JavaScript arrow Using Event Delegation for Mouseover Events in List Items

Using Event Delegation for Mouseover Events in List Items

JavaScript-based event delegation is an efficient approach that allows us to reduce the number of event handlers included in a client-side application. This naturally contributes to improving its overall performance and reliability. This technique rests its functionality on the bubbling phase triggered by a specific event. It’s very simple to learn to code in real-world conditions. This article concludes a four-part series on event delegation.

TABLE OF CONTENTS:
  1. Using Event Delegation for Mouseover Events in List Items
  2. Review: using click event handlers with HTML lists
  3. Implementing event delegation with mouseover events
  4. Event delegation in action
By: Alejandro Gervasio
Rating: starstarstarstarstar / 6
May 06, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Therefore, if you’re a web designer who’s interested in mastering the key concepts that surround event delegation in JavaScript, this set of articles contains numerous hands-on examples that will get you started using this approach within your own client-side applications.  

And speaking of practical examples, now it’s time to review quickly the ones that were developed in the preceding article. In that particular tutorial I explained how to implement the event delegation approach to highlight the items of an unordered HTML list each time a mouse click occurred on each of them. 

This effect was accomplished by using only one single event handler, which was assigned to the whole list and not to each of its items, as you might have supposed initially. 

The flexibility of the event delegation technique permits us to work with  JavaScript events other than mouse clicks. In this final installment of the series, I’ll be discussing how to implement this approach for handling mouseovers with the same sample HTML list that you saw in the previous part, thus completing this introductory overview of delegated events in JavaScript.  

Having introduced you to the subject of this last tutorial, it’s time to continue learning about JavaScript event delegation, right? Then start reading now! 



 
 
>>> More JavaScript Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
   

JAVASCRIPT ARTICLES

- Javascript for Beginners: An Introduction
- Introduction to JavaScript
- Adding Elements to a Tree with TreeView jQue...
- Using the Persist Argument in a TreeView jQu...
- Using Unique and Toggle in a TreeView jQuery...
- Using Event Delegation for Mouseover Events ...
- Using the Animate Option in a Treeview jQuer...
- Using HTML Lists with Event Delegation in Ja...
- Opened and Closed Branches on a TreeView jQu...
- Mouseover Events and Event Delegation in Jav...
- Creating a TreeView JQuery Hierarchical Navi...
- Event Delegation in JavaScript
- A Look at the New YUI Carousel Control
- Working with Draggable Elements and Transpar...
- Displaying Pinned Handles with Resizable Con...

Developer Shed Affiliates

 



© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap

Dev Shed Tutorial Topics: