swisnl / jQuery-contextMenu

jQuery contextMenu plugin & polyfill
https://swisnl.github.io/jQuery-contextMenu/
MIT License
2.24k stars 744 forks source link

Using originalEvent in callback #643

Open JohnCannonIT opened 6 years ago

JohnCannonIT commented 6 years ago

It appears you need originalEvent in callback in order to get data that came from the element you right clicked on in the first place. However, I have tried many variations and I can't figure out how to use it. If anything, it appears that originalEvent itself is undefined (though not sure how that can be - you have to right-click on SOMETHING to get the context-menu to appear). I've searched all over the internet and this site and can't find anything. How do you properly use callbacks and the originalEvent to get data on what was originally right-clicked?

bbrala commented 6 years ago

The 2.x version is a bit inconsistent with the arguments of the different callbacks, what callback do you mean exactly?