Vote down?

It’s worth noting, for the benefit of any confused beginner jQuery users, that Simon’s initial jQuery(function () { line is more usually written as $(document).ready(function () {. Everyone has their own preferred way of writing that DOMReady wrapper; personally I prefer the second way, as it more clearly indicates that the code will be executed when the document is ready.