I have this code in a function:
tableFields = tableFields.children; for (item in tableFields) { // Do stuff }
According to a console.lo
I’m surprised no-one answered with this code:
for(var child=elt.firstChild; child; child=child.nextSibling){ do_thing(child); }
Or, if you only want children which are elements, this code:
for(var child=elt.firstElementChild; child; child=child.nextElementSibling){ do_thing(child); }