Hi,
I would like to ask you, how to add class by JavaScript code? I have tried this piece of code added into Custom JS:
var target = document.getElementsByClassName("addhere")[0];
target.addClass('class1');
targetDiv.classList.add("class2");
Neither ‘class1’ nor ‘class2’ were added into my existing class ‘addhere’. Actually, I can see that ‘addhere’ class exist by Inspect the website and only one class is named like ‘addhere’ class. Is there any mistake in to code above?
———
The next question is about a bug. I set ‘Disable OWL Carousel script on mobile devices’ OFF, but after some websites refreshes it automatically set to ON.
Best Regards