-
Notifications
You must be signed in to change notification settings - Fork 740
Closed
Labels
Description
I have a big div (the blue one) with a ContextMenu and inside another div (green one) with another contextmenu. Both contextmenu shows with right click.
If I make a right clic in the blue div the ContextMenu shows fine. But when I clic in the green div still appears the old contextmenu. If I refresh the page and just clic in the green div, it shows the correct contextMenu.
I made this example http://jsfiddle.net/german_martin/oprkvys1/ of my problem.
ITEM 1
<div class="SingleItem">ITEM 2</div>
<div class="SingleItem">ITEM 3</div>
</div>
$(document).ready(function () {
$.contextMenu({
selector: '.CuadroFondo',
callback: function (key, options) {
if (key == "expand") {
alert("expand");
}
if (key == "creargrupo") {
alert("creargrupo");
}
if (key == "seguridadgrupo") {
alert("jejeje")
}
},
items: {
"expand": { name: "Irak", icon: "add-expand" },
"sep1": "--MAIN MENU--",
"creargrupo": { name: "Afganistan", icon: "crearnuevo" },
}
});
$.contextMenu({
selector: '.SingleItem',
callback: function (key, options) {
if (key == "expand") {
alert("expand");
}
if (key == "creargrupo") {
alert("creargrupo");
}
if (key == "seguridadgrupo") {
alert("jejeje")
}
},
items: {
"expand": { name: "Miami", icon: "add-expand" },
"sep1": "--SUBMENU--",
"seguridadgrupo": { name: "Florida", icon: "seguridad" }
}
});
})