views:

1018

answers:

3

Uncaught TypeError: Property '$' of object [object global] is not a function in line 2:

$(document).ready(function() {
    $('#tabs > ul').tabs({ fx: { opacity: 'toggle' } });
    $('#featuredvid > ul').tabs();
});

problem appears local at 127.0.0.1 only, while same code OK online! - dazzeld... any idea?

+1  A: 

Might be a browser security setting, blocking JS to run locally, are you using IE by any chance? Try with Firefox or play with your security settings in IE

Infinity
thanks, but not the case .... trying w. FF and Chrome only btw.
Olivers
+2  A: 

Is jquery available locally ? (the error you mention usually means that the jQuery is not available - loaded)

Perhaps you are loading it from a relative path and the structure is different to the online version ..

Gaby
nope , the same absolute path using stg likein header<script language="JavaScript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/js/jquery-1.2.6.min.js"></script><script language="JavaScript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/js/jquery-ui-personalized-1.5.2.packed.js"></script><script language="JavaScript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/js/sprinkle.js"></script>
Olivers
A: 

It might be the version of jQuery or something along those lines. I had this exact problem - I was using a local copy of jQuery (version 1.3.2) and then switched to http://code.jquery.com/jquery-latest.pack.js and suddenly it worked (latest at the time was 1.4.1).

I also had some of the issues you mentioned about "Resource interpreted as script but transferred with MIME type text/plain". I think that's safe to ignore for this particular problem as it still shows up for me even though my javascript is working now.

Ryan Elkins