[SCRIPT]-REPLACE “FIND” FOR OPTIMIZATION IN IE8 ?
REPLACE “FIND” FOR OPTIMIZATION IN IE8 ?
Try to reduce the number of advanced selectors inside of find().
Try this:
parentItem.find('input:checkbox');
it’s not the find
problem, but you should optimize your selector expression.
the best practice is use id
, cause jQuery directly call document.getElementById
to select node.
if you use such things like$('.class')
$(input[name=somename])
, there is no directly raw javascript method to do that, and jQuery would scan all the node to find which node you want, that cause the performance problem.
to solve your problem, you’d better specify an id to your element.