How to Prepare Your Sites for jQuery 2.0

jquery2

I remember a time in the 90s when the only viable HTML editor for a teenager was Microsoft FrontPage Express. Everything was tables and frames. Inline styles and JavaScript were common place.

And then the Spiders Came

Fast forward to the mid 2000s and a new start-up called Google came along and made developers think about their mark-up. It had to be semantic. You had to ditch all that inline styling and JavaScript in order for your pages to be optimally indexed by their revolutionary search engine. Developers scrambled to get their heads around the new and trendy CSS. There were plenty of headaches induced by head banging over the inconsistencies between Internet Explorer 6.0 and Firefox 1.0.

Separating Concerns

Developers were learning an important lesson: separating concerns. Sites were now to have HTML as their structure and CSS as their layout. Behavior was still an issue but new libraries such as script.aculo.us and the now ubiquitous jQuery were coming around the corner.

jQuery won the battle of JavaScript frameworks as it really got ‘it’. It was virtually impossible to write jQuery obtrusively. Web Developers now knew where their behavior would reside… in jQuery. Sites would now use HTML for structure, CSS for styling, and jQuery for behavior.

CSS Selectors Everywhere

jQuery was a godsend to this new breed of Web Developers who had just learned CSS.

jQuery used the same CSS selectors and there was little or no translation needed when jumping from CSS to JavaScript. If you were styling an .error div and you wanted that .error div to fade out, you used the same CSS selector.

Progressive Enhancement & Graceful Degradation

The idea was to progressively enhance your site so if the browser was old, had a specialized screen reader or had JavaScript turned off, your site would still be functional. Any in-browser validation would have server-side validation as a backup and any content that should be visible through some interactivity should be easily accessible, either by being visible all the time on the page or via a link.

Practicing What You Preach

In early 2013, jQuery 2.0 is set to be released and drop support for older Internet Explorer (oldIE) browsers.

Whilst jQuery has allowed people to add interactivity unobtrusively, it hasn’t guaranteed that developers have built their sites in a way that has included non-jQuery workflows. These developers could be in for a shock if they drop 2.0 into their existing projects expecting oldIE to continue working.

In general, if you’ve coded your website in the right way, when users visit your site in an old browser, although the user interface may not be as snazzy, the user’s experience will be that they can get to the information they want or perform the task they came to your site to do.

A Moment of Reflection

Whilst the jQuery team are releasing an oldIE compatible 1.9 shortly before 2.0, the advanced announcement of jQuery 2.0 has given us all a reminder of why we fell in love with jQuery in the first place and why it’s important to progressively enhance our sites to allow them to gracefully degrade in certain environments.

I’d love to hear your comments on what you think of the announcement that jQuery 2.0 is dropping support for oldIE and any special plans (if any) you’re making as a result.

Free Workshops

Watch one of our expert, full-length teaching videos. Choose from HTML, CSS or WordPress.

Start Learning

Andrew Chalkley

I'm an alien, I'm a legal alien, I'm an Englishman in Portland. All of my professional life I've worked with computers online. I'm a polyglot programmer and like using the right tools for the job. In my spare time I enjoy spending time with my young family and when I get chance, sticking opponents in Halo 4. You can find me in most places @chalkers.

Comments

Comments are closed.