FullCalendar: Event with tooltips/custom event attributes
HTML
<link rel="stylesheet" href="http://arshaw.com/js/fullcalendar-1.5.3/fullcalendar/fullcalendar.css">
<script src="http://www.arshaw.com/js/fullcalendar-1.5.3/fullcalendar/fullcalendar.min.js"></script>
<link rel="stylesheet" href="http://getbootstrap.com/dist/css/bootstrap.css">
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<a href="#" id="test">This works!</a>
<div id='myCalendar' ></div>
<div id="popover-head" class="hide">some title</div>
<div id="popover-content" class="hide">
<form>
<input type="text" name="asa" value="asa" />
</form>
</div>
CSS
#myCalendarContainer{
width:50%;
height:50%;
}
JavaScript
$(document).ready(function() {
$('#myCalendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
selectable: true,
dayClick: function(start, end, allDay, jsEvent, view) {
$(this).popover({
html: true,
placement: 'top',
title: function() {
return $("#popover-head").html();
},
content: function() {
return $("#popover-content").html();
}
});
}
});
$("#test").popover({
html: true,
placement: 'bottom',
title: function() {
return $("#popover-head").html();
},
content: function() {
return $("#popover-content").html();
}
});
});