alert on click in html code example Example: jquery onclick function $( "#other" ).click(function() { $( "#target" ).click(); });