Title: Problem including jQuery
Last modified: August 20, 2016

---

# Problem including jQuery

 *  [eludlow](https://wordpress.org/support/users/eludlow/)
 * (@eludlow)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-including-jquery/)
 * I’m having problems including my own jQuery on a page. Basically, I have an image
   map, and when regions are mousedover, I want to change the text contents of a
   div. This works fine outside WordPress.
 * I believe I’ve called the script correctly:
 *     ```
       if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
       function my_jquery_enqueue() {
          wp_deregister_script('jquery');
          wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://www.mydomain.com/scripts/the-script.js", false, null);
          wp_enqueue_script('jquery');
       }
       ```
   
 * and indeed it is loading, but it won’t execute.
 * The script is:
 *     ```
       $(document).ready(function( $ ) {
       		$("#ignition").mouseover(function() {
       				$("#label-container").html("Ignition switch");
       	});
       	$("#ignition").mouseout(function() {
       				$("#label-container").html("Point your mouse over the above picture for an explanation about what everything does!");
       	});
       });
       ```
   
 * Any reasons why this wouldn’t work? I’ve read various pages about not using _
   $_, and using _jQuery_, but I’m a little confused.
 * Any help would be appreciated.
 * Apologies I can’t link to page in questions, it’s on a closed site.

Viewing 1 replies (of 1 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 2 months ago](https://wordpress.org/support/topic/problem-including-jquery/#post-3632061)
 * > I’ve read various pages about not using $, and using jQuery, but I’m a little
   > confused.
 * So you’ve ready this [http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_Wrappers](http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_Wrappers)?
 * When developing JavaScript, you should also be working in a developer tool like
   Firebug to get access to the browser’s console log.

Viewing 1 replies (of 1 total)

The topic ‘Problem including jQuery’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/problem-including-jquery/#post-3632061)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
