Skip to content

Writing jQuery/javascript that doesn’t suck

Old content alert!

Thanks very much for visiting my blog. Always happy to have people read my stuff but just thought I should point out this post is years old. If it's about technical stuff there is a possibility that it is no longer relevant, if it's a bug report/fix I'm hoping that it should now have been fixed.

Of course if this is what you're looking for and it does work then great, just don't say I didn't warn you...

At the start of the year I was asked by the London Web Standards Group to do a talk at their January meet-up and after a bit of thinking I decided to talk about writing jQuery/javaScript that doesn’t suck; I’ve had to clean up plenty of badly written code in the past and I therefore thought I had some decent things to say. It must have gone well as the London jQuery user group asked me to give it again in their July met-up (which is on the 4th July). I included reference to plenty of external sites in the talk and they can ALL be found in this post (and a few extra bonuses).

The slides

The links

Organisation

I like running jsLint as part of my build process, and it’s actually pretty easy. If you’re using the HTML5 boiler plate it’s built into that and if you’re a git user you can install which runs it against your JS on each include and warns you of any problems – git pre-commit.

Performance

Don’t forget your accessibility