This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes delegated event performance based on container element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "delegated event performance based on container element" Watch "delegated event performance based on container element" New topic
Author

delegated event performance based on container element

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15292
    
    6

When using delegated events and the on() function, is there any significant performance loss if the container element is something like the body element? I usually try and find the closest parent that I know will be on the page. My assumption is that the less jQuery has to navigate from container to handler, the better. But I really don't know that for sure.


GenRocket - Experts at Building Test Data
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You are talking milliseconds of difference. If you need high performance in a game, closer is better. For a form, does not make a difference.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15292
    
    6

Thanks, Eric.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: delegated event performance based on container element
 
Similar Threads
what could be the answer ?
Web App/Container Relationship
differnce bw cmp and bmp
doGet and doPost
Validating an image upload via "Validator-form.xml"