Advertisement
trentjs

add class by id

Oct 20th, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ADD CLASS BY ID
  2. var thisAddId = document.getElementById("idName");
  3. thisAddId.classList.add("class-name");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement