Title: Uploading jQuery files properly
Last modified: August 22, 2016

---

# Uploading jQuery files properly

 *  Resolved [david221](https://wordpress.org/support/users/david221/)
 * (@david221)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/uploading-jquery-files-properly/)
 * I’m trying to test my jQuery file onto my WordPress. What I want to is to delay
   a video from loading on the screen for half a second. This is what I’ve done 
   so far.
 * Underneath are the WP Enqueue Scripts included in my functions.php file:
 * > add_action ( ‘wp_enqueue_scripts’, ‘wp_scripts’ );
   > function wp_scripts() {
   >  wp_register_script(‘delay’,get_template_directory_uri().”/
   > js/delay.js”,array(‘jquery’),$version,true); wp_enqueue_script(‘delay’); }
 * And this is the code for my jQuery file:
 * >  jQuery(document).ready(function() {
   >  $(‘.horse-banner’).hide(0).delay(500).
   > show(0); });
 * The problem is every time I test it, I keep getting a “Uncaught TypeError: undefined
   is not a function” around line 2. I think it might have something to do with 
   the class titled horse banner.
 * > <div id=”home-page” class=”wide-content”>
   > <div class=”video-container banner-container”>
   >  <video autoplay=”” class=”horse-
   > banner” width=”100%”> <source src=”../../video_1.mp4″ type=”video/mp4″> </video
   > > </div> </div>
 * Please help? :/

Viewing 1 replies (of 1 total)

 *  Thread Starter [david221](https://wordpress.org/support/users/david221/)
 * (@david221)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/uploading-jquery-files-properly/#post-5809071)
 * Never mind, I figured it out. I didn’t write the enqueue script properly.
 * > add_action(‘wp_enqueue_scripts’, ‘enqueue_assets’);
   > function enqueue_assets() {
   >  wp_enqueue_script( ‘delay’, get_stylesheet_directory_uri().“/
   > js/delay.js”, array(‘jquery’), $version, true); }

Viewing 1 replies (of 1 total)

The topic ‘Uploading jQuery files properly’ is closed to new replies.

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * 1 reply
 * 1 participant
 * Last reply from: [david221](https://wordpress.org/support/users/david221/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/uploading-jquery-files-properly/#post-5809071)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
