It is really annoying to develop for Firefox *and* Internet Explorer. Both do different CSS and Javascript. For me a two monitor setup saves time and clicks. As the blog’s sidebar went bigger and bigger I was looking for a solution capable of saving the current state with expanded and collapsed tree items, so when you enter the site again the sidebar will have same look and size.

I did not choosed database for saving. As a good alternative cookies can save it locally at users side of internet. All <li> in sidebar got an unique id attribute and all collapsed nodes make a string like ‘.nt01.nt02.’ All left was saving on onunload event and applying at onload event. Here the story starts:
(more…)