Title: jQuery Library not loading?
Last modified: August 19, 2016

---

# jQuery Library not loading?

 *  [tdevine33](https://wordpress.org/support/users/tdevine33/)
 * (@tdevine33)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/)
 * [http://www.hvce.com/governmentnon-profit-solar-elecrtic/faq/](http://www.hvce.com/governmentnon-profit-solar-elecrtic/faq/)
 * for some reason the jQuery library doesn’t seem to be loading in this site. If
   you view the source you can see that it most definitely is there but the FAQ 
   section is supposed to be a slider and it isn’t. I also tried writing a simple
   bit of jQuery code (below) just to see if the site would read it at all and it
   wouldn’t.
 *     ```
       $(document).ready(function() {
           $('body').css('background', 'red');
       });
       ```
   
 * Any thoughts? I know the library is in the <head> but why won’t it read any jQuery
   code that I’m writing?
 * Thanks for any help in advance!

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Thread Starter [tdevine33](https://wordpress.org/support/users/tdevine33/)
 * (@tdevine33)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066501)
 * sorry… stupid move just made here. There are two sites for sister companies and
   I posted the wrong one. The ACTUAL site is
 * [http://www.adksolar.com/governmentnon-profit-solar-elecrtic/faq/](http://www.adksolar.com/governmentnon-profit-solar-elecrtic/faq/)
 *  Thread Starter [tdevine33](https://wordpress.org/support/users/tdevine33/)
 * (@tdevine33)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066569)
 * bump?
 *  [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066581)
 * Your jQuery library is loading correctly it seems. I just entered the following
   in Firebug’s console window:
 *     ```
       jQuery(document).ready(function($) {
           $('body').css('background', 'red');
       });
       ```
   
 * And the bg turned red as expected.
 * There could be many reasons why your slider is not working. You need to look 
   up the demo code for the slider (if you have access to any) and follow it closely.
 * But you can be sure now that jQuery is loading so that’s not the issue. I noticed
   that you have Contact Form 7 installed. You could try disabling that temporarily
   as that has caused JS problems in the past (in fact I disable the JS load for
   Contact From 7 now).
 *  [janustudios](https://wordpress.org/support/users/jojithedevil/)
 * (@jojithedevil)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066585)
 * Try adding the jquery with this code… Place the js file in root of theme folder…
   I just copied this code for you from my site running already perfect…
 * `<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.
   js"></script>`
 *  [janustudios](https://wordpress.org/support/users/jojithedevil/)
 * (@jojithedevil)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066586)
 * n yes Try that code of jquery in static html if its working… if its broken it
   wouldnt even work in html…
 *  [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066588)
 * jQuery is already loading on his page as I stated above, that’s not the problem.
 * Also, you should really be adding JS libraries via the wp_enqueue_script() function.
   This is the recommended and ‘safe’ way to add JS files to your WordPress page(
   s).
 * See here for more information:
    [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
 *  Thread Starter [tdevine33](https://wordpress.org/support/users/tdevine33/)
 * (@tdevine33)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066603)
 * so when you right the jquery code starting with jQuery and use the function($)
   it works, but not when you start with $ and just have function(). Is this because
   of a conflicting library perhaps?
 *  Thread Starter [tdevine33](https://wordpress.org/support/users/tdevine33/)
 * (@tdevine33)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066604)
 * right = write… sorry its early and I’m still starting on my tea.
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066605)
 * The `$` alias is problematic because several libraries use it. To avoid the problem
   [WordPress loads jQuery in “no conflict” mode](http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers).
   That means that the `$` alias doesn’t work and you have to load jQuery like David
   Gwyer did, defining the `$` alias in a limited scope, or use `jQuery.*` every
   time you want to call a jQuery function. That is why you are having trouble with`
   $`.
 *  [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066615)
 * > so when you right the jquery code starting with jQuery and use the function(
   > $) it works, but not when you start with $ and just have function(). Is this
   > because of a conflicting library perhaps?
 * As specified by the link from apljdi, this is the standard way for handling jQuery
   in WordPress to avoid conflicts with other JS libraries (i.e. Prototype).
 * The great thing about the syntax I posted above is that you can easily cut/paste
   3rd party snippets of jQuery code, which are nearly always written as above (
   using $).
 * That’s why I always use that particular syntax. 🙂
 *  [Drkenny](https://wordpress.org/support/users/drkenny/)
 * (@drkenny)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066619)
 * I also am having a jquery code problem issue is with the insert / upload icon
   in wordpress 3.1.2
 * I just upgraded a few of my WP sites and now cant add images this is on most 
   of my WP blogs is anyone else having this problem?
    in firebug it says that the
   wordpress console was having trouble with jQuery saying it was undefined this
   is on the dashboard page any help is welcome as i am not an experienced coder

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘jQuery Library not loading?’ is closed to new replies.

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 5 participants
 * Last reply from: [Drkenny](https://wordpress.org/support/users/drkenny/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/jquery-library-not-loading/#post-2066619)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
