Geeks With Blogs
Zackary Geers blog

I've heard a lot of people complain about IE and jQuery, and I found out something that supprised me.  IE doesn't support the jQuery class selector well, so it's best practice to avoid it.  I've mentioned it to a few other people, and they were shocked to hear about how badly it performs.  Take a peek at this article, and it describes it in detail.

http://www.artzstudio.com/2009/04/jquery-performance-rules/

From the article:

Note: The class selector is among the slowest selectors in jQuery; in IE it loops through the entire DOM. Avoid using it whenever possible. Never prefix an ID with a tag name. For example, this is slow because it will loop through all <div> elements looking for the ‘content’ ID:

I've seen entire projects that are centered around the class selector, and this explains the performance.

Posted on Friday, December 18, 2009 5:14 PM | Back to top


Comments on this post: jQuery Performance

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Zackary Geers | Powered by: GeeksWithBlogs.net