1799 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+4 more
BroOf says

I am building my own theme options framework and I would like to include the jQuery UI Slider. BUT there is no entry in the official function reference for wp enqueue script: http://codex.wordpress.org/Function_Reference/wp_enqueue_script

Do I have to include the jQuery UI widgets manually or is there another way? How do you do it?

3333 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says

I am building my own theme options framework and I would like to include the jQuery UI Slider. BUT there is no entry in the official function reference for wp enqueue script: http://codex.wordpress.org/Function_Reference/wp_enqueue_script Do I have to include the jQuery UI widgets manually or is there another way? How do you do it?

UI widgets are included with WordPress(wp-includes/js/jquery) there may be a way to enqueue remember the codex isnt always 100%

1799 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+4 more
BroOf says

Ahh! You’re right! Thank you for the help!

1799 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+4 more
BroOf says

Hmm I don’t get it integrated… Has someone a sample code for me please :D?

3333 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says

Hmm I don’t get it integrated… Has someone a sample code for me please :D?
loads jquery UI core and widgets in the footer scripts by default, so make sure you have in your footer
        <?php wp_footer(); ?>
add_action('wp_print_scripts', 'rapid_load_scripts');

function rapid_load_scripts()
{
    if (is_admin())
    {
        return false;
    }

    if (!is_admin())
    {
        wp_enqueue_script( 'jquery' );
        wp_enqueue_script( 'jquery-ui-core' );
        wp_enqueue_script( 'jquery-ui-widget' );

        if ( is_singular() and comments_open() and (get_option('thread_comments') == 1))
        {
            wp_enqueue_script( 'comment-reply' );
        }

    }
}

EDIT : Forum messed up the first one just need the right tags :-)

1799 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+4 more
BroOf says

Thank you so much for your effort. I really appreciate this!

by
by
by
by
by
by