完整日历jquery可选+;上下文菜单
在选择方法时,我正在重新定义一个事件。如何获取元素,即html元素完整日历jquery可选+;上下文菜单,jquery,jquery-ui,contextmenu,fullcalendar,Jquery,Jquery Ui,Contextmenu,Fullcalendar,在选择方法时,我正在重新定义一个事件。如何获取元素,即html元素 $('#calendar').fullCalendar({ header: {}, select: function (start, end, allDay, event, resourceId) { calendar.fullCalendar('renderEvent', {
$('#calendar').fullCalendar({
header: {},
select: function (start, end, allDay, event, resourceId) {
calendar.fullCalendar('renderEvent',
{
title: "tttttttt",
start: start,
end: end,
allDay: allDay,
resourceId: resourceId
},
true // make the event "stick"
);
calendar.fullCalendar('unselect');
}
我需要在RenderEvent上创建上下文菜单。为了做到这一点,我需要它的html元素。我怎样才能得到它?
非常感谢您的帮助我在使用fullCalendar时遇到了类似的问题。它的一些回调仅将eventObject作为参数,而不将HtmleElement作为参数 我的解决方案是在eventAfterRender时引用eventObject中的HtmleElement:
eventAfterRender(calEvent, htmlElement, view){
calEvent.htmlElement = htmlElement;
}
因此,每当您想要获取HtmleElement并手头有eventObject时,您都可以使用“eventObject.HtmleElement”来获取它。您是在使用还是在使用jquery ui?为什么要使用jquery ui标记?我使用jquery.contextmenu,但问题是,我想在select上显示上下文菜单。我不知道;我没有元素,所以我可以附加'element.contextmenu'。如果我执行event.contextmenu,它会给出一个错误,即事件不能用作contextmenu。非常感谢您的回复!也许这个类似的问题对你有帮助。你能解决你的问题吗?