Okay, I have this weird problem in Firefox. I type in Firebug's console
$ == jQuery
Sometime it displays true, and sometimes false. The file is just an empty HTML document with one script tag including jQuery. I refresh the page, click "Run" in the console, and again, occasionally it returns true, occasionally false.
On the occasions where it returns false, $.toString()
gives
function anonymous() {
return window.console.notifyFirebug(arguments, "$", "firebugExecuteCommand");
}
Now here's the weird thing. When $ == jQuery
gives false using Firebug's console, if I go to the address bar and type javascript:alert($ == jQuery);
, it alerts true!
Does anyone have any idea what's going on here? It's (occasionally) messing up my debugging.
There's a native function defined by firebug that assigns $
to getElementById. I don't think you can resolve this "bug" without upgrading to a newer version of Firebug which potentially eliminated the issue, or manually assign $ = jQuery
.
It's probably come as a result of possibly jQuery already being cached and the Firebug $
overriding it as it fires too fast, or vice versa.. just some weird bug in regards to speed of assignment + caching.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With