add class to vanilla js element code example Example: addclass js vanilla element.classList.add('className');