> From: Pops > > I"ve seen this term referred to a few times, especially here: > > http://simonwillison.net/2007/Aug/15/jquery/ > > What does Unobtrusive Javascript mean?
I'm going to disagree slightly with some of the earlier replies. I think "progressive enhancement" and "unobtrusive JavaScript" are two different things, and they seem to be getting lumped together to some degree. Progressive enhancement means writing an HTML page that will work correctly even if CSS and JavaScript are disabled, and that will still work correctly - with usability or esthetic improvements - when CSS and/or JavaScript are available. Unobtrusive JavaScript means clean markup: avoiding cluttering your tags with "onclick" and the like. Obtrusive JavaScript: <a href="whatever" onclick="doClick()" onmouseover="doHover()" onmouseout="endHover()">click me</a> Unobtrusive JavaScript: <a href="whatever" class="clicky">click me</a> ...and somewhere else... $('.clicky').click( doClick ).hover( doHover, endHover ); You can have progressive enhancement with either obtrusive or unobtrusive JavaScript. They are really two separate questions. Those are my definitions anyway. :-) > I am getting the idea that jQuery offers a way to bypass a > user turning off JavaScript? > > How does jQuery do this? It doesn't. Seeing as how jQuery *is* JavaScript, if JavaScript is disabled so is jQuery. It's just that part of the "jQuery philosophy" is to use progressive enhancement so that your web page will still work if JavaScript is disabled. But jQuery is out of the picture at that point. -Mike