Is there a way to chain HTML5 classList API chaining?.
this will not work
var sidebar = document.querySelector("#sidebar");
sidebar.classList.toggle("active").classList.remove("hover")
while this will work
var sidebar = document.querySelector("#sidebar");
sidebar.classList.toggle("active");
sidebar.classList.remove("hover")
NOTE: NO jquery please
See Question&Answers more detail:os