Title: Using jQuery
Last modified: August 20, 2016

---

# Using jQuery

 *  [whajrog](https://wordpress.org/support/users/whajrog/)
 * (@whajrog)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-jquery-1/)
 * Hi. I am trying to figure out how to use jQuery in WordPress. is there a special
   syntax I have to use? I;ve tried countless times and now, I see I need help. 
   Any help would greatly be appreciated.

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

 *  [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-jquery-1/#post-2463673)
 * Use the jQuery built-in to WordPress and ALWAYS use the `wp_enqueue_script()`
   function to add your scripts correctly.
 * [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
 * So, to use jQuery on the front end of your site use something like:
 *     ```
       function add_jquery() {
           wp_enqueue_script( 'jquery' );
       }
       add_action('wp_enqueue_scripts', 'add_jquery');
       ```
   
 *  Thread Starter [whajrog](https://wordpress.org/support/users/whajrog/)
 * (@whajrog)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-jquery-1/#post-2463678)
 * Thank you, David.
 *  Thread Starter [whajrog](https://wordpress.org/support/users/whajrog/)
 * (@whajrog)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-jquery-1/#post-2463680)
 * Oh also, do I add this in the head?
 *  [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/using-jquery-1/#post-2463684)
 * No.
 * It get’s added to the header via the `add_action('wp_enqueue_scripts', 'add_jquery');`
   hook.
 * Just add the code anywhere inside your themes functions.php file.

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

The topic ‘Using jQuery’ 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/)
 * 4 replies
 * 2 participants
 * Last reply from: [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/using-jquery-1/#post-2463684)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
