• I try to load jQuery UI library into my plugin php file but fail.
    I tried to follow some advices from the internet but none of them works.
    The loading of standard jQuery does work:
    wp_enqueue_script(‘jquery’);
    Can someone advice please?
    Regards
    I. Lesher

Viewing 2 replies - 1 through 2 (of 2 total)
  • Maybe the problem lies that you are loading the jquery on the page after the place you are using it.

    Try to use a hook to load the script, and hook in on page load or some other action that is done before the page loads.

    Also check the version of jquery and add a row of console.log(‘Test’) to see if it rely loads or not.

    Try finding a hook on this link:
    https://codex.www.ads-software.com/Plugin_API/Action_Reference

    Thread Starter itzik lesher

    (@triplebit2)

    I use it in the hook ‘wp_enqueue_scripts’ and its inside a plugin so its probbably before any use. I paste the code itself to see maybe I make some other mistake:
    add_action( ‘wp_enqueue_scripts’, ‘ch8lj_front_facing_pages’ );
    function ch8lj_front_facing_pages() {

    wp_enqueue_script(‘jquery-ui-core’);
    }
    Thnx

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘load jQuery UI library into my plugin php’ is closed to new replies.