This post originated from an RSS feed registered with Agile Buzz
by Greg Vaughn.
Original Post: DHTML KISS
Feed Title: Potential Differences
Feed URL: http://gigavolt.net/blog/development/index.rss
Feed Description: Greg Vaughn on Agile methodologies, Java, OS X, whatever piques my interest!
I’ve been tardy in following up to the previous entries about my adventure in dhtml. Well, the floating, transparent div was a problem too. The goal was to highlight a column, but floating the div over the top of the text just served to make it harder to read. Back to the drawing board…
I fell back to the very first thing I thought of but quickly moved past because it seemed too inelegant, inefficient. Shame on me. Now I have the javascript looping over all the td’s in the table and setting the background color of each — either to the highlight color if the column is correct, or to the background color of the row otherwise (to remove the previous highlight if it existed). There’s no performance problem and this is actually more cross-browser friendly. I’m humbled. I’ve given talks including the point of the ‘evil’ of premature optimization, but it is so easy to fall into.