I have the following:
<div id="elementor-tab-title-1141" class="elementor-tab-title elementor-active">
...some stuff...
</div>
I need a JavaScript code to look for all elements with that class, and remove the "elementor-active". So the code, after the JavaScript runs on page load, should look like this:
<div id="elementor-tab-title-1141" class="elementor-tab-title">
...some stuff...
</div>
Here is what I tried:
function changeClass()
{
var classNameArray= document.getElementsByClassName("elementor-tab-title elementor-active");
for(var i = (classNameArray.length - 1); i >= 0; i--)
{
classNameArray[i].innerHTML =
getClassName(classNameArray[i].innerHTML);
classNameArray[i].className = "elementor-tab-title";
}
}
Thanks!