[jQuery] $(NodeList) ?
[jQuery] $(NodeList) ?
Would it be a welcomed/trivial feature for $ to accept NodeLists of
elements and store them as individual elements?
Arash Yalpani is trying to find how to speed up $'s selection and I wanted
to suggest that he preselect the elements with DOM methods and hand $ a
NodeList. Something like:
var $divs = $(document.getElementsByTagName('div'));
But this gets stored as 1 NodeList, not n DIV elements:
alert($divs.size()) // 1
alert($divs.get(0)) // [object NodeList]
--
Steve
http://mrclay.org/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/