HubSpot/youmightnotneedjquery — pull request #56 by krasimir (2014-02-20 16:36:25+00:00)
Title: Completing the `add class` snippet

There are two problems with the current suggestion of adding a new class under IE:

a) If there is no class assigned so far the new one is added with an interval infront. I.e. it looks `class=" my-class"` and not `class="my-class"`.
b) There is no check if the class is already added

Here is a jsbin with the new version: http://jsbin.com/lajuh/2/edit