Home | Posts by Category


Unobtrusive JavaScript Gems

I'm diving in to ECMAScript for the first time, inspired by DOM Scripting (also called Unobtrusive JavaScript). As a web designer of a handful of years resorting to scripting has always left a bad aftertaste in my mouth, not so with these new techniques. Here's a quick list of examples that have impressed me as I've been researching. (Not all of them fully comply with the ideals of unobtrusive script, but those that don't could easily be.)

Archived Comments


I particularly liked the page about YADM (nasty drop down menuses). Consider this gem from the page:

Working with other scripts If YADM were a pupil, its yearbook would sport a smiley face stating "plays well with others". There are no global variables or functions outside the main function yadm and you can easily add your own functions to the onload construct at the bottom of the script.