Анд*_*нов 0 javascript jquery fullcalendar twitter-bootstrap fullcalendar-3
大家!我试图在全日历中显示有关事件的工具提示。但它不起作用,并在控制台中显示此消息
未捕获到的SyntaxError:意外令牌(
有什么问题吗?这是我的js函数代码:
$('#calendar').fullCalendar(function() {
eventAfterRender: function(event, element) {
$(element).tooltip({
title: event.title,
container: "body"
});
}
});
Run Code Online (Sandbox Code Playgroud)
小智 7
在 FullCalendar 4 中,使用 eventRender 函数:
eventRender: function (info) {
$(info.el).tooltip({ title: info.event.title });
}
Run Code Online (Sandbox Code Playgroud)
您正在传递函数。您应该传递您的选项和回调。阅读文件
$('#calendar').fullCalendar({ //Removed function() from here
eventAfterRender: function(event, element) {
$(element).tooltip({
title: event.title,
container: "body"
});
}
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2939 次 |
| 最近记录: |