I think @Krinkle may be onto something. I don't see a unit test that specifically checks for class presence/absence on a jQuery collection with more than one element, and this patch does seem to be wrong for that case. Style issues as well of course.