Fullcalendar 如何将cal.Event.something放入jQuery对话框
我使用JSON加载完整的日历,并在自定义参数中包含每个事件的描述。我想在eventClick函数上使用jQuery对话框,但不知道如何指定它。以下是我想做的:Fullcalendar 如何将cal.Event.something放入jQuery对话框,fullcalendar,Fullcalendar,我使用JSON加载完整的日历,并在自定义参数中包含每个事件的描述。我想在eventClick函数上使用jQuery对话框,但不知道如何指定它。以下是我想做的: eventClick: function(calEvent, jsEvent, view) { $("#cal_event").dialog({ title: calEvent.title, content: calEvent.description });
eventClick: function(calEvent, jsEvent, view) {
$("#cal_event").dialog({
title: calEvent.title,
content: calEvent.description
});
}
在我指出“内容”的地方是否有要使用的对象?如果没有,如何将calEvent.description放入对话框
感谢您提供的任何帮助。我想我会发布我最终是如何做到这一点的,以帮助其他阅读本文的人 我使用了以下方法:
$(document).ready(function() {
$('#calendar').fullCalendar({
theme: "true",
aspectRatio: 1.8,
weekMode: 'liquid',
header: {
left: "",
center: "prev title next",
right: ""
},
buttonIcons:{
prev: "triangle-1-w",
next: "triangle-1-e"
},
eventSources: [
{
url: 'file1.php', // Event Source One //
type: 'POST',
error: function() {
alert('there was an error while fetching events!');
},
color: '#006600',
textColor: 'white'
},
{
url: 'file2.php', // Event Source Two //
type: 'POST',
error: function() {
alert('there was an error while fetching events!');
},
borderColor: '#006600',
color: 'white',
textColor: '#333333'
}
],
eventClick: function(calEvent, jsEvent, view) {
$("#dialog_frame").css("visibility", "visible");
$("#dialog_frame").draggable("enable");
$(".dialog_content").html(calEvent.description);
$(".dialog_title").html(calEvent.title);
}
})
});