Jquery only works when logged in
-
For some reason, my jQuery scripts only seem to load when I am logged into WordPress. Here is the page: https://www.mcfaddengavender.net/newmg/
As you can see, the images are not “sliding” in. However, if I login and return to the homepage, things work fine. Here is the code I’m using to run jQuery in the Functions.php:
//jQuery - Use Google CDN instead of WP jQuery function my_scripts_method() { if (!is_admin()) { wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'); wp_enqueue_script( 'jquery' ); } } add_action('init', 'my_scripts_method'); ?>
Any ideas on what would cause such a weird issue?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Jquery only works when logged in’ is closed to new replies.