WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] jQuery UI no longer working in WP 3.3 beta 4 (6 posts)

  1. k3davis
    Member
    Posted 2 years ago #

    In WP 3.3b3 I was using wp_enqueue_script to load jQuery UI core as well as tabs and dialog, for a plugin I'm developing:

    wp_enqueue_script( 'jquery-ui-core' );
    wp_enqueue_script( 'jquery-ui-tabs' );
    wp_enqueue_script( 'jquery-ui-dialog' );

    Without these "enqueue" statements the UI functions did not work. In beta 4 (no changes to my code) jQuery UI elements no longer load, and I can comment out the relevant enqueue statements and the source does not change. Has something else changed in the way WP loads jQuery elements between beta 3 and beta 4 besides the upgrade to 1.7.1?

  2. k3davis
    Member
    Posted 2 years ago #

    Update: I can confirm that my plugin works once again when I hardcode (bypass the enqueue statements above) a reference to the jQuery UI script from Google CDN. This hardly solves the problem; I want to code to proper standards but it appears something about enqueue-ing jquery-ui got broke in beta 4, or some aspect of doing so changed in a way I can't determine how to adjust for.

  3. Jon Cave
    WordPress Dev
    Posted 2 years ago #

    Works for me in a quick test.

    Could you give some more context to your enqueue code? What hook your function is running on when it calls wp_enqueue_script, etc. Maybe a link to a pastebin site.

  4. Andrew Freeman
    Member
    Posted 2 years ago #

    Make sure you include wp_footer(); That's where it is now.

  5. k3davis
    Member
    Posted 2 years ago #

    I haven't had a chance to check this again since the final release, so it may no longer be an issue - not sure. I don't believe I have to call wp_footer from inside an administrative plugin (?). jQuery worked but the UI elements weren't loaded unless I called them literally using script tags. But - no complaints here. I have to test it against the current version before I can put up any fuss. Ah, the day job... ;)

  6. k3davis
    Member
    Posted 2 years ago #

    Happy to report that whatever changed between beta4 and 3.3 release fixed this issue - no longer relevant. Thanks devs!

Topic Closed

This topic has been closed to new replies.

About this Topic