I have read that it is better to select using "id" than "class" with jquery. However, say i have several divs on a page that i need to select with jquery ...
so sometimes my html needs some special classes/div's/attributes/.. for the jquery scripts to work (the "no-javaSript" version of the site doesn't need these elements to work properly). I'm sure you know ...
I want just to ask for an opinion of perfomance:
Is more faster selecting elements by class name or by attribute name with jquery?
Example I have 100 DIVs element in this form:
Hi all,Can anyone explain the performance impact of using custom attribute selectors?e.g., For the markup: , I'm using selectors like: $('input[itemCode="item1"]');There are a number of dynamically added controls, which store few id's in their custom attributes. I have to loop through and select controls based on these custom attributes. However, when I am using these selectors, I'm ...