<h2 class="add-class">Element</h2>
.add-new-class{
  background:#8864F4;
}
var element = document.querySelector('.add-class');
setTimeout(()=>{
  js_util.u_addClass(element, 'add-new-class');
  js_util.u_style(element, [{ color: 'white' }, { fontSize: 36 }]);
},1400)
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://unpkg.com/@andresclua/jsutil@4.0.4/dist/js_util.umd.js