Imagine there is an element #button1 on website which is watched by jQuery:
#button1
$(\'#button1\').click(function(){ console.log(\"you clicked\"); }; <
You can also use this apart from the answers mentioned already:
$( "#button1" ).trigger( "click" );