Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript fullcalendar中的工具提示不起作用_Javascript_Jquery_Twitter Bootstrap_Fullcalendar_Fullcalendar 3 - Fatal编程技术网

Javascript fullcalendar中的工具提示不起作用

Javascript fullcalendar中的工具提示不起作用,javascript,jquery,twitter-bootstrap,fullcalendar,fullcalendar-3,Javascript,Jquery,Twitter Bootstrap,Fullcalendar,Fullcalendar 3,各位!! 我试图在fullcalendar中显示事件的工具提示。但它不工作,并在控制台中显示此消息 未捕获的语法错误:意外标记( 有什么问题?这是我的js函数代码: $('#calendar').fullCalendar(function() { eventAfterRender: function(event, element) { $(element).tooltip({ title: event.title, cont

各位!! 我试图在fullcalendar中显示事件的工具提示。但它不工作,并在控制台中显示此消息

未捕获的语法错误:意外标记(

有什么问题?这是我的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 });     
}

正确,您必须传递一个配置对象,而不是一个函数。您已经错过了问题的要点。公认的答案在几年前就已经解决了。而且v4的答案与此问题无关。
eventRender: function (info) {
  $(info.el).tooltip({ title: info.event.title });     
}