How do you trigger a click on the <button></button> element with jquery?

By Divern

I know this might be very simple but I can’t get it to work. I am trying to trigger a click on a on page load. Below is the code I am using.

HTML

<button class="triggerme"></button>

JQUERY

$(document).ready(function(){
   $(".triggerme").trigger("click");
});

I can’t change it to an input, or anchor.

Source: Stack Overflow

    

Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273