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.
}