我目前正在嘗試將qtip2添加到fullCalendar窗口中,因此我可以顯示qtip並有鏈接/按鈕來刪除日曆上的選定事件,很不幸,我遇到了麻煩。這裏是我的fullCalendar是什麼樣子:使用qtip2從fullCalendar中刪除元素
$('#calendar_main').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultView:'agendaWeek',
minTime:8,
height:600,
maxTime:20,
editable: true,
allDaySlot:false,
theme: true,
firstDay: 1,
selectable: true,
selectHelper: true,
eventRender: function(event, element) {
element.qtip({
content: "<a onlick='alert('Remove')> Remove me</a>",
title: {
text: 'RDV',
button: false
}
},
position: {
at: 'right-bottom'
},
show: {
solo: true
},
hide: false,
style: 'ui-tooltip-light ui-tooltip-rounded'
});
}
});
我相信這個問題坐鎮qtip的內容屬性中,但不知道爲什麼,這是行不通的。在這種情況下,我只是試圖顯示一個警報,但它不工作(Qtip顯示,但當我點擊「刪除我」時,什麼也沒有發生。一旦我得到這個工作,我將能夠取代警報與我自己的JS函數,將在我的數據庫中刪除選定的事件
PS:我與Adobe AIR的工作,不知道這可能是一個問題
謝謝胡安,不幸的是它仍然不顯示警報框。我想我已經找到了一個解決方法,我顯示一個div,而我把我的JS函數的調用直接放在div代碼中。目前這是一個好的解決方案。再次感謝。 – batmat 2012-02-24 08:10:29