Title: FadeIn Effect using Jquery
Last modified: August 19, 2016

---

# FadeIn Effect using Jquery

 *  [nlex](https://wordpress.org/support/users/nlex/)
 * (@nlex)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/fadein-effect-using-jquery/)
 * Hello. I’m tryin to put a fade in effect onload of the images of my post, using
   the jQuerty that comes with WP.
 * So i have this in my Header.php :
 *     ```
       <?php wp_enqueue_script('fade', '/javascript/fadein.js', array('jquery')); ?>
       ```
   
 * Then the folowing JS in a file : :
 *     ```
       function fade() {
       jQuery('#Picture').load(function(){jQuery("#Picture").fadeIn(600);})
       }
       ```
   
 * Then in my post the image is like :
 *     ```
       <img src="http://www.…hop_03.jpg" id="Picture" width="648" height="486" border="0"  />
       ```
   
 * But it gives no results. Any idea ?

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

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/fadein-effect-using-jquery/#post-1214849)
 * You have to enqueue jQuery itself, before enqueing your script. First, did you
   do that?
 *     ```
       <?php
       wp_enqueue_script('jquery');
       wp_enqueue_script('fade', '/javascript/fadein.js', array('jquery'));
       ?>
       ```
   
 * also, those lines must be located BEFORE
    `<?php wp_head(); ?>` in your theme’s
   header.php file
 * First please confirm you have that in place and working.
 *  Thread Starter [nlex](https://wordpress.org/support/users/nlex/)
 * (@nlex)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/fadein-effect-using-jquery/#post-1214865)
 * Thanks a lot for your help.
 * No i haven’t done that. I was suspecting something like this but i think the 
   WP document doesn’t mention it ? Or maybe i just didn’t understood…
    Anyway when
   i look in Safari developement tools (similar to FIreBug or such), i can see the
   loaded script and i see it loads both jQuery and my ‘fade’ miniscript so i’m 
   not sure thats the problem…
 * Anyway i added the line :
    `<?php wp_enqueue_script('jquery');?>` (of course 
   before end of ‘head’)
 * But, that doesn’t help ! 🙁
 * if you want to check by yourself :
    [http://alturl.com/pjwp](http://alturl.com/pjwp)
   The 1st image should fadein (i know i have a bug in my sidebar but… one things
   after another…)

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

The topic ‘FadeIn Effect using Jquery’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 2 replies
 * 2 participants
 * Last reply from: [nlex](https://wordpress.org/support/users/nlex/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/fadein-effect-using-jquery/#post-1214865)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
