skip to Main Content

Why isn’t the Click() function working in WordPress Javascript?

i want to click a radio element automatically with js. Element selection is perfect because when i try to change it with innerHTML, it changes but click() does not work. Code: document.addEventListener("DOMContentLoaded", function(){ document.querySelector(".jet-radio-list__label").innerHTML = "Changed!" document.querySelector(".jet-radio-list__label").click() } Tried Alternatives…

VIEW QUESTION
Back To Top
Search