I am trying to use jQuery to do something like
if(jQuery(\'#id\').click) { //do-some-stuff } else { //run function2 }
But I\'m unsure h
var flag = 0; $('#target').click(function() { flag = 1; }); if (flag == 1) { alert("Clicked"); } else { alert("Not clicked"); }