Title: Installing Jquery sripts into wordpress
Last modified: August 20, 2016

---

# Installing Jquery sripts into wordpress

 *  [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * (@ravalde)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/)
 * Hi can anyone point me to a tutorial on how to include jquery scripts I have 
   tried the code below in my function.php but it doesn’t work.
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_

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

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234399)
 * I think they need to be registered to be enqueued….
 * [http://codex.wordpress.org/Function_Reference/wp_register_script](http://codex.wordpress.org/Function_Reference/wp_register_script)
 *  Thread Starter [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * (@ravalde)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234643)
 * How do i use pastebin I’ve copied my code into it but where do I connect it to
   my post
 *  Thread Starter [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * (@ravalde)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234644)
 * Sorry link to my code is below. I have placed all my assets and images in the
   root of my testsite child theme Im working in twenty eleven.
 * These are the jquery scripts that came with the slider.
    jquery-1.6.1.min.js 
   jquery-ui-1.8.10.custom.min.js jquery.wt-lightbox.js jquery.wt-lightbox.min.js
   jquery.wt-scroller.js jquery.wt-scroller.min.js slider.js
 * This is in my functions.php to enque the scripts
    [http://pastebin.com/ULL7S2pW](http://pastebin.com/ULL7S2pW)
 * This is slider.js and is in my js folder at the root of my child theme
    [http://pastebin.com/yssKsETj](http://pastebin.com/yssKsETj)
 * this is the link to the plugin page
    [http://codecanyon.net/item/jquery-horizontal-image-scroller-w-lightbox/112734](http://codecanyon.net/item/jquery-horizontal-image-scroller-w-lightbox/112734)
 *  Thread Starter [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * (@ravalde)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234645)
 * RE: see above
 *  Thread Starter [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * (@ravalde)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234791)
 * Thanks not sure if thats the problem I love this scroller just cant seem to get
   it to work in wordpress the guy who created it says its easy to install in WP
   beats me what I’m doing wrong.
 *  [Jackson Whelan](https://wordpress.org/support/users/madjax/)
 * (@madjax)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234792)
 * This would be much easier to troubleshoot with a link to the test site.
 * You should also look at this: [http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/](http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/)
   for information on using jQuery in WordPress using a noConflict wrapper to avoid
   trouble, and not using the ‘$’ shortcut.
 *  Thread Starter [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * (@ravalde)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234793)
 * Thanks (Jackson)
 * Think I’ve tried that method think I’ll try and find a plugin but so far found
   nothing similar to the codecanyon scroller above that’s avaailable.
 *  [vjpo](https://wordpress.org/support/users/vjpo/)
 * (@vjpo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234794)
 * I don’t know exactly what is affecting your script.
    Try `wp_register_script('
   jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js' );`
   it will load script to the header (now it’s loading to the footer)
 * add `array('jquery')` to all `wp_enqueue_script` functions that loading jQuery
   scripts, e.g.
    `wp_enqueue_script('lightbox', get_bloginfo('template_directory').'/
   js/wt-lightbox.min.js', array('jquery'));`
 * The last one – may be it doesn’t work because of jQuery version – try to change
   version to 1.4.2 to check it.
 * Links to tutorials in the “Resources” section on this page
    [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
 *  Thread Starter [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * (@ravalde)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234801)
 * Hi vjpo thanks for the advice, can i ask when you say “(now it’s loading to the
   footer)” do you literaly mean this is happening or is this an instruction to 
   load from the footer, …Thanks
 *  [vjpo](https://wordpress.org/support/users/vjpo/)
 * (@vjpo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234803)
 * the code from your functions.php pastebin example
    `wp_register_script('jquery','
   http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js', false, '1.6.1',
   true);` `true` at the end of string places js script to the footer `$in_footer
   = true`
 * `<?php wp_register_script( $handle, $src, $deps, $ver, $in_footer ); ?>`
    [http://codex.wordpress.org/Function_Reference/wp_register_script](http://codex.wordpress.org/Function_Reference/wp_register_script)
 * But, by the way, did you resolve the issue?
 *  Thread Starter [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * (@ravalde)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234804)
 * No – thanks for the advice still cant get it to work I think with all the hassle
   related to this scroller, I think I’ll try to find a plugin that is similar just
   havn’t found one that works yet
 * [http://codecanyon.net/item/jquery-horizontal-image-scroller-w-lightbox/112734](http://codecanyon.net/item/jquery-horizontal-image-scroller-w-lightbox/112734)
 *  [vjpo](https://wordpress.org/support/users/vjpo/)
 * (@vjpo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234805)
 * try to load your slider.js (second pastebin example) by this way.
    Add this code
   to your functions.php
 *     ```
       // Load Dom Ready Javascripts
       function load_scroller_js() { ?>
       <script type="text/javascript">
           jQuery(document).ready(function($) {
           //initialize scroller
           // full scroller script here
       </script>
       <?php }
       add_action('wp_head', 'load_scroller_js');
       ```
   
 * and exclude same script from the enqueue list
 *  Thread Starter [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * (@ravalde)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234806)
 * Thanks again vjpo still cant get it to work – works in the html example I downloaded–
   I’ll leave it and find a plugin – found one thats 90% there just judders every
   now and then it’s an iframe example here’s the link if anyone needs it
 * [http://www.gopiplus.com/work/2011/07/24/wordpress-plugin-wp-iframe-images-gallery/](http://www.gopiplus.com/work/2011/07/24/wordpress-plugin-wp-iframe-images-gallery/)
 *  Thread Starter [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * (@ravalde)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234808)
 * maybe I need to include something like this that targets the child theme
 * add_action(‘get_header’, ‘metric_load_scripts’);
    function metric_load_scripts(){
   wp_enqueue_script(‘follow’, CHILD_URL.’/lib/js/follow.js’, array(‘jquery’),’1′,
   TRUE); }

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

The topic ‘Installing Jquery sripts into wordpress’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 14 replies
 * 4 participants
 * Last reply from: [Mark Shirley](https://wordpress.org/support/users/ravalde/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/installing-jquery-sripts-into-wordpress/#post-2234808)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
