It's like Windows Explorer with folders in the left.
I have a "root" <span> (like My Computer :) ) and several <span>s inside the "My Computer" <span> (they have a display: none), and more <span>s nested inside those.
When you click on a span, the browser checks if the <span> contains (an) element(s). If it does, it sets its display: block and thus shows it.
how did you call razsiri() function? it should be:
Damn, I really suck with this event thing... I learned JavaScript from a book that did not contained little info about event and on top of it I didn't understand a damn thing because I was just a newbie in JavaScript then. I think I should read through that chapter again. And this time read it thoroughly...