JavaScript
  Home arrow JavaScript arrow Using Event Delegation for Mouseover Events in List Items
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
JAVASCRIPT

Using Event Delegation for Mouseover Events in List Items
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 3
    2009-05-06


    Table of Contents:
  • Using Event Delegation for Mouseover Events in List Items
  • Review: using click event handlers with HTML lists
  • Implementing event delegation with mouseover events
  • Event delegation in action

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Using Event Delegation for Mouseover Events in List Items
    ( Page 1 of 4 )

    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.

    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
     

       

    JAVASCRIPT ARTICLES

    - 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...
    - Building Resizable Containers with the Ext J...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek