Tooltip in fullcalendar not working

Андрей Баранов picture Андрей Баранов · May 8, 2015 · Viewed 9.2k times · Source

everyone! I'm trying to show tooltip over events in fullcalendar. But it's not working and show in console this message

Uncaught SyntaxError: Unexpected token (

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"
        });
    }
});

Answer

Antonio Santise picture Antonio Santise · Sep 5, 2019

In FullCalendar 4, use eventRender function:

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