jQuery - Detect Mouse Button Click
At the first place we need to assume that our HTML code contains the code:
<div id="buttondiv">Button</div>
<br/>
<p>Press Mouse Button over the "Button" text above</p>
Next step is to add jQuery code to check which mouse button is clicked: