• Resolved Rhand

    (@rhand)


    Using this code in /themes/thematic-child/functions.php :

    <?php
    $theme_name= 'Thematic Child Theme';
    function domtab_link() {
        echo '<script type="text/javascript" scr="' . get_bloginfo('stylesheet_directory') . '/scripts/domtab.js"></script>' . "\n";
    }
    add_action('wp_head', 'domtab_link');
    
    ?>

    It does load the javascript in the source, but it is not registered by the DOM and does not give my tabs the tabbed function. How come?

Viewing 1 replies (of 1 total)
  • Thread Starter Rhand

    (@rhand)

    <?php
    function my_scripts() {
    wp_register_script('dom_tab', get_bloginfo('stylesheet_directory') . '/scripts/domtab.js');
    wp_enqueue_script('dom_tab');
    }
    add_action('init', 'my_scripts');
    ?>

    works

Viewing 1 replies (of 1 total)
  • The topic ‘Child theme javascipt loaded, but not functional’ is closed to new replies.