0

I'm using jQuery Context Menu plugin.

I have the following:

$('div').contextMenu({
    menu: 'menu'
},function(action, el, pos) {
    //some statements
});

How to activate it when a user 'click' instead of just right click?

2 Answers 2

2

LOL

I was going to say: change plugin code, line 40

if( evt.button == 1 ) {

to

if( true ) {
Sign up to request clarification or add additional context in comments.

2 Comments

I saw evt.button == 2 instead.
Sorry, I changed it in the console to test it and then copied the changed line instead of the original. Well, at least I got the line number right and my point across. Cheers!
-1
$('div').click(function(){
$("").contextMenu({
    menu: 'menu'
},function(action, el, pos) {
    //some statements
});
});

this should work fine

3 Comments

didn't work. What i want is to show the context menu when div is clicked
i just edit my post... i replace bind to click.. cause bind sometimes has a problem and also the tagget where to show the contextMenu and where do you want the context menu to show
it won't work either. When clicked, it just assigned the context menu when clicked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.