How can you detect when a click event has been raised by jquery.trigger?
<p>I have a button that doing some action while it's clicked. For example</p>

<pre><code>$(function() {

    $('button1').click(function(e){
        /** This is just a pseudocode

        if( me.triggering ) {
            doTrigger();
        }else{
            doClick();
        }

        **/
    })

    $('button2').click(function(e){
        $('button1').trigger('click')
    })

});
</code></pre>

<p>How can you tell whether the event is executing by a call to <code>trigger</code> or from a user click?</p>
