Title: enqueue jQuery
Last modified: August 21, 2016

---

# enqueue jQuery

 *  [andym33](https://wordpress.org/support/users/andym33/)
 * (@andym33)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/enqueue-jquery-1/)
 * I have the following code in a mu-plugin file that adds a couple of buttons with
   popup windows next to the add media button, it works great but after doing some
   reading I think I am supposed to enqueue the jQuery which I have tried to do 
   but I’m not sure how to do it for the following:
 *     ```
       add_action('media_buttons_context', 'add_my_custom_button');
       function add_my_custom_button() {
       ?>
       <script>
         jQuery(document).ready(function($) {
          $('.popup').click(function() {
            var NWin = window.open($(this).prop('href'), '', 'scrollbars=1,height=400,width=400');
            if (window.focus)
            {
              NWin.focus();
            }
            return false;
           });
       });
         </script>
         <a href="http://example.com" class="popup button">test button 1</a>
         <a href="http://example.com" class="popup button">test button 2</a>
         <?php
       }
       ```
   
 * Could anyone help me out, thanks.

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

 *  [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/enqueue-jquery-1/#post-4887393)
 * You shouldn’t need to enqueue jquery as it comes bundled with WordPress. Note
   that WordPress uses jQuery in a noConflict mode, which means you can write jQuery
   code by writing jQuery instead of using the $ symbol.
 * Example:
 *     ```
       jQuery(document).ready(function() {
         alert('Hey, this is working in noConflict mode!');
       });
       ```
   
 *  Thread Starter [andym33](https://wordpress.org/support/users/andym33/)
 * (@andym33)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/enqueue-jquery-1/#post-4887395)
 * I see, thanks for the tip and fast support

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

The topic ‘enqueue jQuery’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [andym33](https://wordpress.org/support/users/andym33/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/enqueue-jquery-1/#post-4887395)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
