Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript ‘ Tested ‘ JQuery Not Responding…. Help!

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36748
    MartyBoi
    Participant

    Hello everyone….

    I am having an issue getting my JQuery to Call…. I had tested it’s functionality, and it simply isn’t working.

    I am using the HTML5 Blank WordPress theme, and all is well except this minor little detail…

    This is what I have used to test/call the JQuery to test it’s functionality, I used it within the function.js file:


    // remap jQuery to $
    (function($){})(window.jQuery);


    /* trigger when page is ready */
    $(document).ready(function (){

    alert('test');

    });

    There was no action when called, it did not alert….

    This is what I have in my funtions.php file:


    // Load jQuery
    if ( !function_exists(core_mods) ) {
    function core_mods() {
    if ( !is_admin() ) {
    wp_deregister_script('jquery');
    wp_register_script('jquery', ("//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"), false);
    wp_enqueue_script('jquery');
    }
    }
    core_mods();
    }

    Is there a bug in this script perhaps? Or am I not understanding what is going on here?

    Advice needed….

    Thank you…

    #97028
    jamygolden
    Member
    ')

    Make sure to put that just before the closing </body>. It should work.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.