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
The way to do it would be with a boolean at a higher scope:
var hasBeenClicked = false; jQuery('#id').click(function () { hasBeenClicked = true; }); if (hasBeenClicked) { // The link has been clicked. } else { // The link has not been clicked. }