Twitter bootstrap tooltips do not work for events in fullcalendar

user2598794 picture user2598794 · Sep 5, 2013 · Viewed 10.5k times · Source

I want to show bootstrap tooltips over events in fullcalendar of Adam Shaw. I tried this code:

eventMouseover: function (event, jsEvent) {
                $(this).tooltip();
                $(this).css('rel', 'tooltip');
                $(this).tooltip({
                    selector: '[rel=tooltip]'
                });                
            },

But it does not work. What's wrong here?

Answer

Peter Valadez picture Peter Valadez · Apr 4, 2015

You can shorten your answer a bit like this:

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