我试图将fullCalendar jquery添加到我的MVC 4项目中的视图中。当我尝试铺设页面时没有错误,但日历没有出现在页面上。我不确定为什么它没有出现,我看过文档,看起来我已经把所有内容都覆盖了。
Here is my HTML:
@{
ViewBag.Title = "Calendar";
}
<h2>Calendar</h2>
<html>
<head>
<title>Calendar</title>
<link href="@Url.Content("~/Content/fullcalendar.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/fullcalendar.print.css")" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="@Url.Content("/Scripts/moment.min.js")"></script>
<script type="text/javascript" src="@Url.Content("/Scripts/jquery.min.js")"></script>
<script type="text/javascript" src="@Url.Content("/Scripts/jquery-ui.custom.min.js")"></script>
<script type="text/javascript" src="@Url.Content("/Scripts/fullcalendar.min.js")"></script>
<script type="text/javascript">
$("#calendar").fullCalendar({
});
</script>
</head>
<body>
<div id="calendar"></div>
</body>
</html>
这是我的CSS:
#calendar {
width: 900px;
margin: 40px auto;
}
答案 0 :(得分:0)
将refs添加到您要使用的库中;
<link rel='stylesheet' href='fullcalendar/fullcalendar.css' />
<script src='fullcalendar/lib/jquery.min.js'></script>
<script src='fullcalendar/lib/moment.min.js'></script>
<script src='fullcalendar/fullcalendar.js'></script>
<script type='text/javascript'>