I am trying to set up a page with a calendar, my problem is that i am not sure how to organizr the inclussions so that i dont get errors, here is my <head>
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<link href="fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css" />
<script src="jquery/jquery-1.8.1.min.js" type="text/javascript"></script>
<script src="fullcalendar/fullcalendar.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
// put your options and callbacks here
})
});
</script>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
When my page starts, i get an error that says Microsoft JScript runtime error: '$' is undefined and it highlights the whole jquery in yellow (its a popup with the error). What can i do to avoid the error?, i am registering jquery as you can see, so not sure why that error comes up.
Thank you I grately appreciate your help.
The code seems okay.Only problem I think your reference to jquery library is not right.See the source code and click on the jquery library including line to test whether the path is fine or not. Keep the
jquery-1.8.1.min.json the same folder where these php files are or use any CDN libray likeIf it would’t work, use
noConflict()to fix it:Hope it helps !!