So far I have to do this:

elem.classList.add("first");
elem.classList.add("second");
elem.classList.add("third");

While this is doable in jQuery, like this

$(elem).addClass("first second third");

I’d like to know if there’s any native way to add or remove.

16 Answers
16

Leave a Reply

Your email address will not be published. Required fields are marked *