Title: enqueue jQuery Accordion scripts
Last modified: August 21, 2016

---

# enqueue jQuery Accordion scripts

 *  [lberelson](https://wordpress.org/support/users/lberelson/)
 * (@lberelson)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/enqueue-jquery-accordion-scripts/)
 * I have 3 jQuery accordion scripts that live in my content theme in /jquery-ui/
   js/
 *  jquery-ui-1.10.3.custom.js, jquery-1.9.1.js, ux.js
 * They work when hardcoded in header. Having trouble enqueuing them.
 * **functions file**
 *     ```
       function jqueryAccordion () {
          wp_register_script ('accordion', get_template_directory_uri() . '/jquery-ui/js/', array('jquery-ui-1.10.3.custom.js', 'jquery-1.9.1.js','ux.js') );
          wp_enqueue_script( 'accordion', get_template_directory_uri() . '/jquery-ui/js/', array('jquery-ui-1.10.3.custom.js', 'jquery-1.9.1.js','ux.js') );
       }
   
       add_action('init', 'jqueryAccordion');
       ```
   

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/enqueue-jquery-accordion-scripts/#post-4144432)
 * Do not enqueue extra copies of jQuery. WordPress allready ships with jQuery 1.10.
   x
 *  Thread Starter [lberelson](https://wordpress.org/support/users/lberelson/)
 * (@lberelson)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/enqueue-jquery-accordion-scripts/#post-4144439)
 * ux.js has modest modification to the doc model. EIther way the syntax (or something
   else i’m doing is wrong) and not working. I know the scripts are fine b/c they
   work hardcoded. So it’s how i’m implementing enqueue.
    I thought if i put it 
   in a function file it would get called before the header and work which from 
   what i saw on some posts was the problem. As is written scripts just arent’ being
   called… am i supposed to implement this somewhere else… template itself just 
   uses div accordion which works when hardcoded.

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

The topic ‘enqueue jQuery Accordion scripts’ is closed to new replies.

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [lberelson](https://wordpress.org/support/users/lberelson/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/enqueue-jquery-accordion-scripts/#post-4144439)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
