Fix $ is not a Function WordPress Error || Solution of $ is not a Function || $ is not a function when calling jQuery function

 Solution of  $ is not a Function


This is not an issue it's simple error in enqueue in script .
Here you can learn how to fix it.
A simple solution just copy and past this code in your functions.php file or plugin main file if you work on plugin.


यह कोई समस्या नहीं है यह स्क्रिप्ट में एनक्यू में सरल त्रुटि है।

यहां आप इसे ठीक करना सीख सकते हैं।

एक सरल समाधान बस इस कोड को अपने functions.php फ़ाइल में कॉपी और पेस्ट करें और अपनी

 जेएस फ़ाइल का नाम बदलें। file and change the name of your js file .


function task_enqueue_scripts() {

    /* 

  JavaScript Localizetion For call the url in js “admin_ajax.php”;

     */

wp_enqueue_script('Your_jsFilename', get_stylesheet_directory_uri().'/yourjsfilename.js', array('jquery'), null, true );  

 }

add_action('wp_enqueue_scripts','task_enqueue_scripts');


And here notice high lighted text jquery in array is most important 
and also you need to copy past this code in your js file .
like that - for example -

 

   jQuery(document).ready(function($) {

   alert("hello");

    //here you can write your js code code 

});


And here notice high lighted text function($)  is most important 

now you need to save and check your console error is gone.


$ is not a function when calling jQuery function error solved if this article is helpful than please share and comment.  

  Author - Shyam Nishad