Support » Themes and Templates » Using jQuery Effects in Theme Template Files

  • Im currently working on a child theme, creating a single-*.php file for one of my custom content types. The end result is that it will be using some jquery for links generated on each single page of this content type, specifically UI Effects like blind, bounce, fold, etc..

    I have looked over this documentation more than 20 times and I find thee overall documentation confusing when it comes to showing how to use jquery ui effects in themes:

    I was using the following in my functions.php to no avail:

    function wgm_scripts () {
    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'jquery-ui-core' );
    wp_enqueue_script( 'jquery-effects-core' );
    wp_enqueue_script( 'jquery-effects-blind' );
    add_action( 'wp_enqueue_scripts', 'wgm_scripts' );

    Relevant source that shows this as the way to do it:

    Neither JQuery UI, nor JQuery Effects Core are being loaded. So clearly none of my jquery for the effect blind would work. For kicks, I tried loading one of my theme-specific javascript libraries in wgm_scripts

    function wgm_scripts () {
                    'easytabs', get_stylesheet_directory_uri() . '/js/jquery.easytabs.js',
    add_action( 'wp_enqueue_scripts', 'wgm_scripts' );

    Note that easytabs is installed in my theme folder’s js folder and actually doesnt depend on jquery-ui-core or jquery-effects-core to run. However, when I checked my page with firebug again, I noticed that both those libraries loaded.

    Why cant I call the jquery-ui-core or jquery-effects-core in its own wp_enqueue_script statement? Should I be trying to load my jquery-effects-blind and list both jquery-ui-core & jquery-effects-core as dependencies?

  • The topic ‘Using jQuery Effects in Theme Template Files’ is closed to new replies.