Don't take this comment too seriously, since it's already been pointed out that jQuery doesn't worry about this either, but this is going to cause issues for SVG elements, where the className is an object.