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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With