• I have searched quite a bit to resolve this issue, but please direct me if I have missed something related to my issue.

    I am having trouble getting my JS script to work. My CSS fallback is working, so I know the code is correct on that end. Here is how I am calling the function. Got it straight from the Codex. This is in functions.php

    //Load my script for images
    if ( !is_admin() ) { // instruction to only load if it is not the admin area
       // register your script location, dependencies and version
       wp_register_script('my_script',
           get_bloginfo('template_directory') . '/js/myscript.js',
           '1.0' );
       // enqueue the script
       wp_enqueue_script('my_script');
    }

    When I view the source, it is calling the function, and it appends my wp version to the end of it. Not sure if that is supposed to happen or not.

    http://www.chrissciolla/test

The topic ‘JS loading but not creating desired effect’ is closed to new replies.