• I have looked around and found a lot of information on this but can not get it to work in my plugin. I have a .js file with several scripts in it that I want to load from my plugin. I have the following code in my main plugin .php file but it doesn’t seem to load on my page. Please help!

    function addJS() {
    wp_enqueue_script(‘js_imagefade’, get_bloginfo(‘wpurl’) . ‘/wp-content/plugins/ImageFade/ImageFade.js’,false,’.01′);
    }

    add_action(’init’, ‘addJS’);

The topic ‘Using JavaScript in Plugin’ is closed to new replies.