当我添加标题时,例如我的生日日历停止加载
这是我的脚本:
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay,listMonth'
},
weekNumbers: true,
editable: true,
eventLimit: true, // allow "more" link when too many events
selectable: true,
selectHelper: true,
//Select function
//Event render
//Event drop
//Event resize
events: [
<?php foreach($events as $event):
//Fetch data dynamically
title: '<?php echo $event['title']; ?>',
<?php endforeach; ?>
]
});
我该怎么办?
是的,
因为单引号似乎结束了您的字符串。您应该尝试转义特殊字符。你可以试试这个:
title : 'my's Birthday'
或
title : "my's Birthday"
或
title : 'my"s Birthday'