Help w/Javascript

I had someone tweek a website for me. jQuery works fine on his server, on my site, I get the following message:

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Timestamp: Thu, 14 Oct 2010 21:15:34 UTC
Message: ‘nodeName’ is null or not an object
Line: 981
Char: 3
Code: 0

and this is the line in jquery-1.4.1.js that is causing the problem

data: function( elem, name, data ) {
if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {

What do you guys and gals think is causing this issue? My developer can’t seem to figure this out.
I am grateful for any info that could help me resolve this issue.


Well, this looks completely wrong. Te below data method call doesn’t use the expected node element data type. There, are several places inside this file that the data method is called with a string as the first parameter rather than an node object. The data method signature expects a node object, not a string, which could be one of several things causing the issue. Run a find for “data” on the previously mentioned file and you will see all the data method calls that are incorrectly using a string as the first argument rather than a node object.

    $.fn.jcarousel = function(o) {
        if (typeof o == 'string') {
            var instance = $(this).data('jcarousel'), args =, 1);
            return instance[o].apply(instance, args);
        } else
            return this.each(function() {
                $(this).data('jcarousel', new $jc(this, o));