I have attached an event to a text box using addEventListener. It works fine. My problem arose when I wanted to trigger the event programmatically from another
addEventListener
What you want is something like this:
document.getElementByClassName("example").click();
Using jQuery, it would be something like this:
$(".example").trigger("click");