[thelist] No need to loop in JavaScript - if you know your Event Handling

Christian Heilmann codepo8 at gmail.com
Wed Oct 25 07:33:45 CDT 2006


As a response to all the libraries out there advocating lots of
methods to retrieve collections of elements to loop over or attach
other methods to I just wanted to remind people that looping is slow
and sometimes not really needed.

As a proof I set up a 13 lines hierarchical tree menu script that does
not need any loop at all:

http://icant.co.uk/sandbox/bonzaimenu/

enjoy
Chris

-- 
Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/



More information about the thelist mailing list