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"
});
}
});
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"
});
}
});
Share
Improve this question
edited Oct 23, 2019 at 16:13
ADyson
62k16 gold badges75 silver badges89 bronze badges
asked May 8, 2015 at 8:24
Андрей БарановАндрей Баранов
4234 gold badges6 silver badges15 bronze badges
0
2 Answers
Reset to default 7In FullCalendar 4, use eventRender function:
eventRender: function (info) {
$(info.el).tooltip({ title: info.event.title });
}
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"
});
}
});