Auto-click button element on page load using jQuery

You would simply use jQuery like so…

<script>
jQuery(function(){
   jQuery('#modal').click();
});
</script>

Use the click function to auto-click the #modal button

Leave a Comment