It shows that $ is not a function
here is my function.php code
wp_enqueue_script( 'mail-scripts', get_template_directory_uri() . '/js/mail-script.js', array ( 'jquery' ), 1.1, true);
$(document).ready(function() {
var form = $('#myForm');
It shows that $ is not a function
here is my function.php code
wp_enqueue_script( 'mail-scripts', get_template_directory_uri() . '/js/mail-script.js', array ( 'jquery' ), 1.1, true);
$(document).ready(function() {
var form = $('#myForm');
Wrap your jQuery code in this:
(function($){
// jQuery code is in here
})(jQuery);
Try replacing "$" with "jQuery" in you js file and test.