Jquery button click on object retrieve id?

Associate
Joined
18 Oct 2002
Posts
2,092
Location
Edinburgh
Anyone good at jquery?

im writting a site and i want a popup on an object to display a div with various info on the right click on a specific div

previously i have always used javascript to handle the onclick (yes i know jquery handles click events better) events then feed the item into jquery, however given the onclick event doesnt apply to the right click. im unsure how to get it to work.

a basic example of what you are clicking is bellow, please bear in mind the objectid is created dynamically so its not as simple as typing in the exact id.

Code:
<div id="myid1">
right click here
</div>

so how can i get the div id without knowing it on a right click?
 
I too suggest setting a class, or other attribute such as role on the divs you wish to use :)

My post was merely an example of how to access right-click functionality. :)
 
right i get ya, so i can set a class to say my outgoing connections and then use that as the selector for the mousedown event
 
Back
Top Bottom