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