$("#element").bind("keydown", function(e) {
if (e.which === 39) { //if keyboard right arrow
$("#element").trigger({
type: 'mousedown',
button: 2
}).trigger({
type: 'mouseup'
});
$("#element").bind('mousedown', function(ev) {
if (ev.which === 2) {
//call method - I need pageX and pageY coordinates
//methods.show.apply($this, [ev.pageX, ev.pageY, options.showAnimation]);
alert("called");
}
});
}
});
What I am trying to do is: Press the keyboard right arrow key, this then emulates the mouse right click trigger and now what I need is a handler so I can launch my context menu which needs X & Y coordinates.