Quick Rant: JavaScript Programming Sucks
I wouldn’t call myself a programming genius or even very skilled programmer but for the most part I know what I’m doing - if I don’t I have the interweb to help; it is part of my job as a web developer. I’m more of a jack-of-all-trades; master-of-none.
That being said…
<rant>Man does programming javascript suck! I really haven’t done too much but since I’m doing more ActionScript programming in Flash (which is similar to JavaScript), I’m becoming more familiar with doing so. But there are literally 1001 different ways of accomplishing any one thing and you’d be lucky if the method you choose is supported between the two major browsers. I’m constantly checking my test page in IE and then FireFox.
My curse right now is to make an expanding/contracting list. Not to hard. Just determining which <li> has a child list and then setting some class values, insert a toggle to open or close the list. I have all that working but now the fun starts. I need to determine if any number of nested lists contain the selected/active page and if so, make sure the parents are initially set to be open. Yeah real fun.
I’m trying to avoid a those pesky cascading menu systems as I can’t stand them. And I’m trying to avoid script bloat which is why I’m building it myself. I do enjoy making things work and figuring things out but sometimes the process is a bit annoying.
That is all.
</rant>
[update: I figured it out and it wasn't that hard. Note to self...I'll have to create a example section to show off code examples]
