The principles of unobtrusive JavaScript

To make sure that your scripts do not inconvenience anyone, you should make sure your scripts do not make any assumptions.

The purpose of JavaScript is to add a layer of usability to your site. Note the “adding” bit: if the script is the entire usability layer (in other words, if the site is unusable without JavaScript), you’ve made a serious mistake and your script is not unobtrusive.