SO - 19508288

by Arun P Johny

HTML

<p id="myId">Some text <span>some other text</span>
</p>

JavaScript

$('p').on('mousedown', function(e){
    if(e.which == 3){
        alert(this.id)
    }
})