Fullcalendar中的工具提示不起作用 [英] Tooltip in fullcalendar not working
本文介绍了Fullcalendar中的工具提示不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家! 我正在尝试在全日历中显示有关事件的工具提示.但这不起作用,并在控制台中显示此消息
everyone! I'm trying to show tooltip over events in fullcalendar. But it's not working and show in console this message
未捕获的SyntaxError:意外令牌(
Uncaught SyntaxError: Unexpected token (
可能有什么问题?这是我的js函数代码:
What can be a problem? This is my js-function code:
$('#calendar').fullCalendar(function() {
eventAfterRender: function(event, element) {
$(element).tooltip({
title: event.title,
container: "body"
});
}
});
推荐答案
您正在传递函数.您应该传递您的选项和回调.阅读文档
You are passing function. You should pass your options and callbacks. Read Docs
$('#calendar').fullCalendar({ //Removed function() from here
eventAfterRender: function(event, element) {
$(element).tooltip({
title: event.title,
container: "body"
});
}
});
这篇关于Fullcalendar中的工具提示不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文