I have some functionality which is bound to a click event:
$('.addButton').live('click', function(){
//stuff here...
});
Sometimes the function is called by an actual button click, and sometimes using trigger(). Is there a way to detect which method has been used?
Thanks!
See this: http://api.jquery.com/category/events/event-object/
See example here: http://jsfiddle.net/expertCode/d5SW2/