在添加eventRender行之后,函数eventRender出现问题:函数(事件,元素),日历停止显示。我添加了(可能不错?)库。 Fullcelendar版本3.4.0。
我使用eventRender两次。一次在事件栏中显示说明,一次在弹出标签中显示。
<script src='https://cdnjs.cloudflare.com/ajax/libs/qtip2/3.0.3/jquery.qtip.min.js'></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/qtip2/3.0.3/jquery.qtip.min.css">
<script>
$(document).ready(function() {
var calendar = $('#calendar').fullCalendar({
editable:false,
locale: 'pl',
header:{
left:'prev,next ',
center:'title',
right:'today'
},
events: 'load.php',
selectable:true,
selectHelper:true,
rendering: 'background',
eventRender: function(event, element, view, info)
{
element.find(".fc-title").html("ID: " + event.id + " - " + event.title);
if(event.approved == "1") {
element.css('background-color', '#f26e1e');
}else {
element.find(".fc-title").html("DO AKCEPTACJI " + "ID: " + event.id + " - " + event.title);
}
}
eventRender: function(event, element) {
element.qtip({ /* qtip is not included with fullcalendar */
content: event.description
});
}
});
});
</script>