Skip to content

Instantly share code, notes, and snippets.

@Dragod
Created July 14, 2022 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dragod/8107bddeef6b0784ca05f4e1b7136655 to your computer and use it in GitHub Desktop.
Save Dragod/8107bddeef6b0784ca05f4e1b7136655 to your computer and use it in GitHub Desktop.
Vanilla js add class
let addClass = (el = [], className= 'disnone') => {el.forEach(el => { return document.querySelector(el).classList.add(className) })}
addClass(['.login .homepageLogo','.cs-login-Instruct', '.sd-login', '.loginDisclaimer', '.login'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment