Simon Willison’s Weblog

Subscribe
Atom feed for unobtrusive-javascript

9 items tagged “unobtrusive-javascript”

2008

Capital Radio’s London Guide. Worth pointing out: the search / map interface on this page is one of the best examples of progressive enhancement I’ve ever seen. Try disabling JavaScript and see what happens. It seems like most developers just can’t be bothered with this kind of attention to detail these days, which disappoints me.

# 29th August 2008, 1:48 am / capitalradio, londonguide, progressive-enhancement, javascript, accessibility, google-maps, unobtrusive-javascript

Is It OK to Require JavaScript? Not if you can avoid doing so. Unobtrusive JavaScript really isn’t hard if you design it in from the start, and since stackoverflow is a community forum / questions and answers site I have trouble imagining a feature that can’t be made to work without JavaScript.

# 10th June 2008, 6:41 am / javascript, jeff-atwood, stackoverflow, unobtrusive-javascript

Unobtrusive JavaScript with jQuery. The online handout for the tutorial I gave this morning at XTech.

# 6th May 2008, 6:53 pm / jquery, javascript, handout, xtech, xtech08, unobtrusive-javascript

Embedding custom non-visible data in HTML 5. “Every HTML element may have any number of attributes starting with the string ’data-’ specified, with any value.”—this will be incredibly useful for unobtrusive JavaScript where there’s no sensible place to store configuration data as HTML content. It will also mean Dojo has an approved method for adding custom attributes to declaratively instantiate Dojo widgets.

# 19th April 2008, 10:58 pm / html5, javascript, standards, unobtrusive-javascript, html, dojo, customattributes

2007

Unobtrusively Mapping Microformats with jQuery

Microformats are everywhere. You can’t shake an electronic stick these days without accidentally poking a microformat-enabled site, and many developers use microformats as a matter of course. And why not? After all, why invent your own class names when you can re-use pre-defined ones that give your site extra functionality for free?

[... 2,277 words]

I have another technique [...] that I'll be switching jQuery to. If you attempt to insert into the document.body before the document is fully loaded, an exception is thrown. I take advantage of that to determine when the document is fully loaded.

John Resig

# 26th September 2007, 12:21 pm / ie, domcontentloaded, jquery, javascript, unobtrusive-javascript

DOMContentLoaded for IE, Safari, everything, without document.write. Stuart has taken Hedger’s recent IE technique, combined it with the others and compressed it in to a short-as-possible code snippet that you can paste in to your scripts without having to include the whole of jQuery/YUI/Dojo/Prototype.

# 26th September 2007, 12:19 pm / ondomready, safari, ie, documentwrite, javascript, stuart-langridge, domscripting, unobtrusive-javascript

IEContentLoaded. An alternative method of detecting DOMContentLoaded on IE; works by polling until the doScroll() method on an unattached element stops throwing errors.

# 24th September 2007, 12:10 pm / domscripting, domcontentloaded, hedger-wang, ie, iecontentloaded, javascript, unobtrusive-javascript

2004

Executing JavaScript on page load

Peter-Paul Koch recently wrote:

[... 772 words]