I Want to Remove all class except dpkCursor
<div class="dpkCursor active disk"></div>
I'm reseting it on mouseenter
target.addEventListener("mouseleave", resetCursor);
function resetCursor() {
// dpkCursor.classList.remove("active");
dpkCursor.className = ""
dpkCursor.classList.add(dpkCursor); // bad approach
}
I dont want to remove this class like this as because its breaking my css and cause flickers just remove all class except this What is the best way to do so