Jquery selectors by CSS class in IE is really slow--workarounds?
Posted
by Sam Lee
on Stack Overflow
See other posts from Stack Overflow
or by Sam Lee
Published on 2010-06-17T00:48:14Z
Indexed on
2010/06/17
0:52 UTC
Read the original article
Hit count: 330
I have a web app where I have several elements with class="classA"
. I want to select and apply a function to all of them. I am doing the obvious thing, which is $(".classA").each(function () { ... })
. This works just fine in Chrome/Safari/Firefox but is really slow in IE. It turns out IE has serious performance issues when selecting things by CSS class in jQuery.
I was wondering if anyone has suggestions on good ways to deal with this. I can't use ID selectors because there can be multiple DOM elements I want to select.
© Stack Overflow or respective owner