WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] jQuery ui wp_enqueue_script problem WordPress 3.3 (4 posts)

  1. Andrew Freeman
    Member
    Posted 2 years ago #

    I'm having a major pain in the ass enqueuing some scripts for use in my theme.

    It was announced that WordPress 3.3 includes the entire jQuery UI library, but I can't even get the core loaded into my theme for some reason.

    This is my functions.php :

    <?php
    function meso_enqueue_scripts() {
        //$accordion = get_template_directory_uri() . '/js/jquery.ui.accordion.js';
        //$deps = array('jquery','jquery-ui-core');
        wp_enqueue_script('jquery');
        wp_enqueue_script('jquery-ui-core');
        //wp_enqueue_script('jquery-ui-accordion');
        //, $accordion, $deps);
    }
    add_action ( 'wp_enqueue_scripts', 'meso_enqueue_scripts');
    ?>

    And I do call wp_head(); . I have my old accordion script commented out because 3.3 includes it natively, but now I can't even get the core to load in properly.

    Anyone know what I may be doing wrong?

    Thanks.

  2. Andrew Freeman
    Member
    Posted 2 years ago #

    Just a quick note-when I enqueue jquery-ui-core I do get jquery itself in there (the new 1.7.1) but still no core.

    Maybe it's renamed.

  3. Andrew Freeman
    Member
    Posted 2 years ago #

    You have to include wp_footer();

    D'oh.

  4. jennybeaumont
    Member
    Posted 2 years ago #

    Hi asfreema,

    I was looking for a little help...I've been wordpressing a while, but am relatively new to JQuery. Does each script that I might want to use then need to be called in this way?

    thanks for your help,
    -jennyb

Topic Closed

This topic has been closed to new replies.

About this Topic