How to detect left click anywhere on the document using jQuery?
<p>I have this right now:</p>

<pre><code>$(document).click(function(e) { alert('clicked'); });
</code></pre>

<p>In Firefox, this event is firing when I left-click OR right-click. I only want it to fire when I left-click.</p>

<p>Does attaching a click handler to the document work differently than attaching it to other elements? For other elements, it only seems to fire on left clicks.</p>

<p>Is there a way to detect <em>only</em> left clicks besides looking at e.button, which is browser-dependent?</p>

<p>Thanks</p>
