forked from adriancooney/voyeur.js
-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
Im learning DOM from the code, I dont understand why you offer the first element instead of traverse it.
eg: I have two ul elements.
<ul><li>1</li><li>2</li></ul>
<ul><li>3</li><li>4</li></ul>now HTML.body.ul.li only get the first ul's li, its very odd. and the second ul dont inherit any methods, i must use HTML.ify to initial it by manully.
How about write like this:
if (force || !list.each) {
if (!list.slice){ list = _.slice.call(list); }
_.methods(list);
for (var i = 0, len = list.length; i < len; i++) {
_.node(list[i], force);
}
}Metadata
Metadata
Assignees
Labels
No labels