My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 745: Installation trouble - '$('#calendar').fullCalendar' [undefined] is not a function
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Dec 2010


Sign in to add a comment
 
Reported by kena...@gmail.com, Dec 2, 2010
I'm having trouble getting a calendar set up on my site.  It's a Drupal site, but I'm not using the fullcalendar Drupal module because I want to display a Google calendar.

My HTML follows the example pretty closely:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
...
<script type="text/javascript" src="/misc/jquery.js"></script>
<script type="text/javascript" src="/misc/drupal.js"></script>
<script type="text/javascript" src="/misc/collapse.js"></script>
<link rel='stylesheet' type='text/css' href='/misc/fullcalendar/fullcalendar.css' />
<script type='text/javascript' src='/misc/fullcalendar/fullcalendar.js'></script>
<script>
$(function() {
    $('#calendar').fullCalendar({
        // put your options and callbacks here
    })
});
</script>
...
</head>

<body class="not-front logged-in page-node node-type-page one-sidebar sidebar-left col-2 ">
...
<div id='calendar'></div>


However, no calendar appears, and in Safari's error console I see "TypeError: Result of expression '$('#calendar').fullCalendar' [undefined] is not a function."  In the console I can verify that $('#calendar') does return a div node.

I'm using JQuery 1.3.2, JQuery UI 1.6, and Drupal 6.19.  Any hints greatly appreciated!

 -Ken

Dec 3, 2010
Project Member #1 althaus.it
Sounds stupid, but have you checked that the file is really loaded?
Dec 3, 2010
#2 kena...@gmail.com
Well, I think so - I can manually visit /misc/fullcalendar/fullcalendar.js and it loads.  Some other way to verify?  You're right that it's acting like it's not loaded.
Dec 3, 2010
#3 kena...@gmail.com
The problem seems to be with this snippet at the end of the page:

<script type="text/javascript" src="/sites/all/modules/jquery_update/replace/jquery.min.js?E"></script>

If I remove that, the calendar starts working.  I guess I don't quite understand what this line is for, though, it seems to be added automatically by the jquery_update module, so I don't want to (nor would I know how to) get rid of it.  Any suggestions?
Dec 6, 2010
Project Member #4 althaus.it
If this is a problem of Drupal, you should look there for help as this here wouldn't be the right place.
Dec 6, 2010
#5 kena...@gmail.com
Yeah, it does look like a Drupal problem now, feel free to close this.
Dec 26, 2010
Project Member #6 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Done
Sign in to add a comment

Powered by Google Project Hosting