views:

78

answers:

2

I am getting a strange error in Firebug, that I am not getting in Webkit. The error comes up as ' $( ' in firebug.

Here's the code that is supposedly causing it to flip:

$.getScript("http://kylehotchkiss.com/min/?g=packageHome", function() {
 $(".countdown").countdown({
  until: new Date(2010, 6 - 1, 5),
  layout:'{dn} {dl}'
 });
}); 

The error isn't specific to the countdown script, it's just giving me an error trying to call any plugin I just loaded in firefox. Any ideas?

+1  A: 

Is the '$' object loaded first? Make sure jquery is loaded before you attempt to use this script.

Malfist
Yeah man, jQuery is loaded long ago. I can run a console.log right after my getScript, so the downloading the script and callback work fine, it just is iffy about running the code just downloaded.
Kyle
Do a console.log($)
Malfist
I'm with these two. The only time I see this happening is when the code isn't getting to jQuery. What other javascript extensions are you using? We may need to see more code to help trace this down.
drachenstern
try running `$ === jQuery` in the console, to verify that jQuery is loaded, and `$` is aliased right. In Firebug, `$` is normally an alias for `document.getElementById`. If you load jQuery after Firebug is set up, it might not get transferred right.
bcherry
+1  A: 

Have you tried using jQuery() instead of $ ?

jQuery.getScript("http://kylehotchkiss.com/min/?g=packageHome", function() {
 jQuery(".countdown").countdown({
  until: new Date(2010, 6 - 1, 5),
  layout:'{dn} {dl}'
 });
}); 
sjobe