Hi, On Wed, 2003-12-03 at 19:34, Chris Moschini wrote: > for( i = 0; i < len; i++ ) { > if( node.childNodes.length == 0 ) > last = node.appendChild( list[ i ] ); > else > node.insertBefore( list[ i ], last ); > } what about for( i = 0; i < len; i++ ) node.insertBefore(list[i], node.firstChild()); ? ok there are two method calls instead of only one but I think this is acceptable (and inserting at the beginning of the list is IMHO less common than appending) -- lucaReceived on Wednesday, 3 December 2003 14:29:21 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 October 2009 08:24:57 GMT