我在页面上填充所有月份,例如:
<?php foreach(range(0,11) as $month): ?>
<div style='float:left; width:303px;' id='calenderSalesMonth_<?php echo $month ?>' class='calenderSales'></div>
<?php endforeach; ?>
fullCalendar
应该通过设置特定月份id='calenderSalesMonth_*'
并且它不起作用,我收到一个错误:
Uncaught TypeError: Cannot call method 'split' of undefined
代码:
$('.calenderSales').fullCalendar({
editable: false,
events: { url: 'calender-events.php' },
firstDay:1,
month: $(this).attr("id").split("_")[1],
year: 2013
});