We all know that you can simulate click or any other event on an element using one of these ways:
$(\'#targetElement\').trigger(\'eventName\'); $(\'#targetEl
Here's one way I have found (tested in Chrome)
$('#foo').click(function(e) { if (e.originalEvent) alert('Has e (manual click)'); else alert('No e (triggered)'); });
See here for testing: http://jsfiddle.net/ZPD8w/2/