samedi 24 novembre 2018

Javascript add class

I have this line in javascript document.getElementById("load").classList.add("active"); but not working. Where is problem and what I must change?

In html I have

<div class="loading" id="load"></div>

And I need with javascript add class active to this div.




Aucun commentaire:

Enregistrer un commentaire