简体   繁体   中英

Firebug's jQuery won't load on my site

Jquery works fine. Everything is functional. If I open up console and type :

console.log($)

it returns :

 function()

But if I type:

$("p")

I get:

null

Literally for anything. Strange! So I open up Google Chrome and try out their Console. Chrome returns :

undefined

jQuery is properly embedded in the header. And again, everything is working fine on the site itself.

Side Note

I just upgraded Firefox, and realizing that it was too early for my plugins to catch up, I uninstalled it and installed 7. jQuery does work perfectly alright on other sites.

When I tried going to your site $ is undefined


I just noticed in one of your files you have: var $j = jQuery.noConflict();

This makes $ undefined and sets $j as your jQuery handler. ( see source here )

So if you try $j('selector') it works fine ^_^

(the name of the file is bwbps.js )

try console.log(jQuery) or

$ = jQuery;
console.log($);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM