Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have to register the jQuery UI in function file. I don't want it directly in header.php

function my_jquery_ui() {
// register your script location, dependencies and version
wp_register_script('jquery-ui-1.8.16', get_template_directory_uri().'/js/jquery-ui-1.8.16.js', array('jquery'), '1.8.16');
// enqueue the script
wp_enqueue_script('jquery-ui-1.8.16');
}
add_action('wp_enqueue_scripts', 'my_jquery_ui');

According to firebug, the jQuery plugin is registered

I'm trying to create tabs which you can see it here:

http://www.vmjconsulting.com/wordpress01/testing/#tabs-1

Please Advise.

share|improve this question

closed as too localized by Chris_O, toscho Jul 15 '12 at 23:03

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
jQuery-ui is being loaded in the footer below your tabs script tags. You need to set jquery as a dependency for jQuery Ui. How to enqueue scripts has been answered numerous times –  Chris_O Dec 2 '11 at 22:45

1 Answer 1

Have you tried enqueuing jquery ui tabs as well?

wp_enqueue_script( 'jquery-ui-tabs' );

Then setting the element in your main javascript file?

jQuery('#tabs').tabs();

share|improve this answer
    
It worked once you add jQuery(document).ready(function($){ –  Victor Johansson Apr 1 '12 at 19:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.