如何在fullcalendar中实现两个不同的上下文菜单?单击带有.fc-event的元素后,第一次启动,而单击.fc-day元素,则第二次启动。 来源
$('.full-calendar').contextmenu({
delegate: '.fc-event',
selector: '.fc-event',
menu:
//Menu 1
[
{
title: "Test1", action: function (event, ui) {
some location..
}
},
{
title: "Test2", action: function (event, ui) {
some location..
}
},
{ title: "Cancel" },
]},
{
delegate: '.fc-day',
selector: '.fc-day',
menu:
//Menu 2
[
{
title: "Test3", action: function (event, ui) {
some location..
}
},
{
title: "Test4", action: function (event, ui) {
some location..
}
},
{ title: "Cancel" },
]},
);