Quantcast
Viewing all articles
Browse latest Browse all 95954

lberelson on "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 all articles
Browse latest Browse all 95954

Trending Articles