我正在尝试将qtip2与我的FullCalendar集成在此测试网站上:http://www.pilatesintuition.co.uk/test/pilates-classes.html
不幸的是我无法触发qtip - 有人能告诉我我的编码错误吗?我是jquery等的新手,所以不了解它是如何工作的。
这是我的代码:
<script type='text/javascript'>
$(document).ready(function() {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
// put your options and callbacks here
events: 'https://www.google.com/calendar/feeds/pilatesintuition%40gmail.com/public/basic'
})
$('#calendar').fullCalendar({
height: 400
});
$(document).ready(function () {
var myEvents = [];
var date = new Date();
var y = date.getFullYear();
var length = 12;
for (var month = 1; month < length; month++) {
var month = (month <= 9) ? '0' + month : month;
var startdate = y + '-' + month + '-10';
var enddate = y + '-0' + month + '-15';
myEvents.push({
title: 'event',
start: startdate,
//end: enddate,
description: 'event Of ' + startdate,
allDay: true
});
}
$('#myCalendar').fullCalendar({
events: myEvents,
eventRender: function(event, element) {
element.qtip({
content: event.description
});
}
});
});
});</script>
请有人告诉我这里做错了什么吗?我上传了jquery.qtip.min.js文件并将其链接到我的页面。我还在此网站上找到了上述代码:http://jsfiddle.net/ramsunvtech/XyNnH/
提前致谢。