tags:

views:

17

answers:

1

Hi,

you can disable the menu

$(document).bind("contextmenu", function(e) {
    return false;
});

you can show a div

$(document).bind("contextmenu", function(e) {

    $('#menu').css({
        top: e.pageY+'px',
        left: e.pageX+'px'
    }).show();

    return false;

});

but is it possible only to add an entry to the rightclick contextmenu?

Thanks in advance!
Peter

+3  A: 

Not in JavaScript no...this could have some pretty malicious uses.

You can create your own menu (like your <div> example), but not add items to the native browser context menu.

Nick Craver
Thanks Nick! Have a nice weekend :)
Peter