gpt4 book ai didi

javascript - 全日历中的工具提示不起作用

转载 作者:行者123 更新时间:2023-12-01 02:28:42 25 4
gpt4 key购买 nike

大家好!我正在尝试在全日历中显示事件的工具提示。但它不起作用并在控制台中显示此消息

Uncaught SyntaxError: Unexpected token (

可能会出现什么问题?这是我的 js 函数代码:

$('#calendar').fullCalendar(function() {
eventAfterRender: function(event, element) {
$(element).tooltip({
title: event.title,
container: "body"
});
}
});

最佳答案

在FullCalendar 4中,使用eventRender函数:

eventRender: function (info) {
$(info.el).tooltip({ title: info.event.title });
}

关于javascript - 全日历中的工具提示不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30119156/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com