I'm trying to close my tooltip in the jQuery calendar:
By clicking on the event, the tooltip will appear and an "x" in the upper corner, when you click on it the tooltip should be closed, the code in the JS on line 16 calls the function to close.
But I'm not getting results.
JS
$.fn.popover.defaults.container = 'body';
$('#mycalendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'agendaWeek,agendaDay'
},
eventRender: function (event, element) {
element.popover({
title: 'My Title <div id="x-fechar">x</div>',
placement:'top',
html:true,
content: event.msg
});
$('#x-fechar').click(function(e){
element.popover('hide');
});
},
editable: false,
events: [
{
title : 'Click me 1',
msg: 'I am clipped to the left which is annoying',
start : '2014-09-01 06:00:00',
end : '2014-09-01 08:00:00',
editable: false,
allDay : false
},
{
title : 'Click me 2',
msg: 'I am OK',
start : '2014-09-04 14:00:00',
end : '2014-09-04 15:00:00',
editable: false,
allDay : false
}
]
});