I am getting began with Wordpress and seeking to make use of jQuery as my JavaScript library of preference. I have first got it loading with wp_enqueue_script but for whatever reason once the page really loads the $ function it will so by using it acting enjoy it does in Prototype (single dollar sign is "manage Id" and $$ may be the CSS selector system).

I am very confused why because I am unable to find any place in the response in the server in which the instruction to load Prototype is originating from there's no <script> tag within the mind or body that indicates the library, and Firebug's listing of loaded scripts doesn't include it. Has other people experienced this problem, and when where is Prototype hiding?

Update

After getting a concept, I attempted something - the $ and $$ behavior is a component of Wordpress's copy of jQuery 1.4.2: Loading the script from Google's CDN resolved the issue. Therefore the new real question is, "How come Wordpress jQuery vary from normal jQuery?"

"How come Wordpress jQuery vary from normal jQuery?"

WordPress loads jQuery in no conflict mode - another script around the page must've been trying out the $ surely?

Several things I would try to be able to debug this:

  • Save Page As -> Web site, complete. Search the resulting directory for "Prototype".

  • Then start trying out your saved copy from the page. You can place <script> tags at various points within the mind from the document, trying to puzzle out when $ is placed, or when its behavior changes.

  • Or, in Opera, use this.watch("$", function () { alert(Error().stack); }) to determine where it's set.