If I were to call addClass on an element that already had the class I was adding, such as:
<div id="lolID" class="lolClass"></div>
and then:
$("#lolID").addClass("lolClass");
Would this cause problems or just do nothing?
Same for removeClass but reversed.
Nope. No effect. jQuery handles that for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With