嵌入jquery日历插件 - 什么都没有出现?

时间:2014-08-16 21:56:36

标签: javascript jquery html calendar embed

我正在尝试将此jquery日历嵌入到我的网页中 http://www.jplugins.net/pretty-calendar/?demo

我按照此处列出的指示: https://www.apptic.me/blog/making-pretty-calendars-with-jquery.php

虽然我已将此处列出的所有基本功能都粘贴到我的文档中(包括示例脚本)但没有显示任何内容。任何见解?以下是相关代码:

    <link rel="stylesheet" type="text/css" href="https://www.apptic.me/projects/calendar/pretty-calendar-minified.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://www.apptic.me/projects/calendar/pretty-calendar-minified.js"></script>

</head>

<body>

<div id="navWrap" style="width:70%;height:80%;position:absolute;top:10%;margin:0 auto;right:0;left:0;"></div>

<script>
var events = [];
events[0] = [];
events[0][0] = "Sunday";
events[0][1] = "3:00pm";
events[0][2] = "Just a sample event"
events[0][3] = "#c0c0c0";
events[1] = [];
events[1][0] = "Monday";
events[1][1] = "12:00pm";
events[1][2] = "Another event"
events[1][3] = "#8FD8D8";

var prettyCal = new PrettyCalendar(events, "navWrapper");
</script>

1 个答案:

答案 0 :(得分:0)

是的,你有ID“navWrap”但是你试着用“navWrapper”来调用这个函数。