Since the hot topic this week is jQuery, the subject of Unobtrusive JavaScript is bound to come up.
Long ago we all figured out how superior it was to move stylistic information out of the markup and into CSS styles. Abominations like the <font> tag were deprecated in HTML 4, and HTML 5 goes further to eliminate all such stylistic markup from HTML.
But even though we separate style from markup, it's still very common to see
behavior mixed with the markup.
Unobtrusive JavaScript does for behavior, what CSS does for style -- removes it from the markup.
This has the same advantages. The markup defines the document structure, the CSS defines the styles, and the JavaScript defines the behavior.
Typically, the script is all sequestered into <script> blocks in the <head> and document ready handlers (described
here) are used to initialize the page.
This keeps everything neat and tidy, and it's easy to know where to look for the behavioral aspects of the page.