WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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:


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.

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

Have you tried enqueuing jquery ui tabs as well?

wp_enqueue_script( 'jquery-ui-tabs' );

Then setting the element in your main javascript file?


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.