javascript is not working on Event Submission?

I am using Events Manager Plugin

Javascript is not working on Submit Events Page .
I found the reason behind this , that was, I have written a line of code in functions.php to call jquery file.

wp_enqueue_script('jquery-1.7.2',get_template_directory_uri().'/js/jquery-1.7.2.min.js');

When I remove this line of code then javascripts start working fine on Event Submission Page but this file is important for me because I am using this file at many places too so I can not remove this. For Example I have a line of code which generates error.Line is :

var p_option = $('input[@name="p_option"]:checked').val(); .

This line is written in ‘wordpress_1/wp-content/themes/my-theme/sidebar.php’

I also asked this question on plugin support but no reply from there.

Thanks in advance!!!

1 Answer
1

You’re enqueuing a specific version of jQuery. It’s better to enqueue the version that comes with WP, like this: wp_enqueue_script('jquery'); in a function run by the hook wp_enqueue_scripts

Leave a Comment