Title: ReferenceError: Can&#039;t find variable: jQuery
Last modified: August 21, 2016

---

# ReferenceError: Can't find variable: jQuery

 *  [lepressing](https://wordpress.org/support/users/lepressing/)
 * (@lepressing)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/referenceerror-cant-find-variable-jquery/)
 * Hi all,
 * this my jQuery fonction in the file _customs.js_ :
 *     ```
       jQuery(document).ready(function($) {
       	var img = new Image();
       	var images = ['header-box-bck-1.png', 'header-box-bck-2.png', 'header-box-bck-3.png', 'header-box-bck-4.png', 'header-box-bck-5.png', 'header-box-bck-6.png',];
           img.src = 'my_URL/' + images[Math.floor(Math.random() * images.length)] + '';
   
       	$(img).one('load',function(e) {
       		$('.background').html(img);
       		$('.background img').fadeIn(3000);
       	});
   
       	if(img.complete) img.trigger('load');
        });
       ```
   
 * and I make an wp_enqueue_script of customs.js in my functions.php, I load correctly
   my script but I have this on my console : **ReferenceError: Can’t find variable:
   jQuery**.
 * Maybe an idea ?
    tks for your help !

The topic ‘ReferenceError: Can't find variable: jQuery’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [lepressing](https://wordpress.org/support/users/lepressing/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/referenceerror-cant-find-variable-jquery/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
