Title: add correctly JavaScript + jQuery 1.6.4
Last modified: June 10, 2021

---

# add correctly JavaScript + jQuery 1.6.4

 *  Resolved [ashop1](https://wordpress.org/support/users/ashop1/)
 * (@ashop1)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/add-correctly-javascript-jquery-1-6-4/)
 * hello, hope to write in the right place ..
    It happens that I try to do everything
   and I search the internet for many websites but somehow I cannot make the javascript
   + jquery code of this example work: [http://jsfiddle.net/bluntfakie/j5415gyg/](http://jsfiddle.net/bluntfakie/j5415gyg/)
 * nor from others that use the same javascript + jquery code
 * I have some script codes added by me but I can’t with this
 * I already tried in my .js folder of the child theme among other things.
 * Could you tell me how to add that last code to make it work please?
 * I suppose it is simple, I do not want to use any complement for that because 
   I do not learn anything else. From already thank you very much

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/add-correctly-javascript-jquery-1-6-4/#post-14541908)
 * You need to enqueue your .js file in PHP with [wp_enqueue_script()](https://developer.wordpress.org/reference/functions/wp_enqueue_script/).
   Specify `['jquery']` as a dependency. And somehow include the related CSS into
   your site. You can add it to your child theme style.css, or enqueue a separate
   file with wp_enqueue_style().
 * Call the PHP enqueue functions from a callback hooked to “wp_enqueue_scripts”
   action. The HTML can all be placed in a Custom HTML editor block.
 * Note that WP jQuery runs in noConflict mode, so `$` shortcuts do not work, use
   explicit `jQuery` instead, or use a “noConflict wrapper” (see my user note (second
   one) near the bottom of the above linked docs page.) Also, the WP jQuery version
   is currently 3.5.1. AFAIK the proffered jsfiddle code is still compatible.
 *  Thread Starter [ashop1](https://wordpress.org/support/users/ashop1/)
 * (@ashop1)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/add-correctly-javascript-jquery-1-6-4/#post-14543350)
 * Thank you very much for your answer, I will review it.

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

The topic ‘add correctly JavaScript + jQuery 1.6.4’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [ashop1](https://wordpress.org/support/users/ashop1/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/add-correctly-javascript-jquery-1-6-4/#post-14543350)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
