yandex
loader

please wait

  • Imran Malik Mar-13-2019 05:56:28 AM ( 1 week ago )

     

    I linked jquery file in functions.php, but doesn't work Here is code in functions.php

    add_action("wp_footer","js_scripts");
    function js_scripts()
    {
        wp_enqueue_script("jquery",get_template_directory_uri()."/jquery.js");
        wp_enqueue_script("f",get_template_directory_uri()."/f.js");
    }

    Here is code in f.js

    $(document).ready(function(){

         alert("ready good");

    });

     
  • Lucky Negi Mar-13-2019 05:58:10 AM ( 1 week ago )

    Firstly, ensure you have WordPress loading onto your template.

    In your head file, ensure you have this loaded in not in functions file

    php wp_enqueue_script("jquery"); ?>

    Next, WordPress has to use noConflict mode or use the base jQuery call instead of $.

Please login

Similar Discussion

Recommended For You