- This topic has 11 replies, 2 voices, and was last updated 8 years, 5 months ago by Mahesh.
-
AuthorPosts
-
March 15, 2016 at 8:27 am #87494[email protected]Participant
Hello,
My site panthernet.net has a temperamental slider, and I’m guessing it is caused by a jQuery conflict and the order at which the scripts are loaded is causing the random behavior.
I am getting these errors in console also,
default-calendar.min.js?ver=3.0.14:6 Uncaught TypeError: m.on is not a function
catchflames.slider.js?ver=1.0:12 Uncaught TypeError: jQuery(…).cycle is not a functionThanks!
March 15, 2016 at 11:57 am #87521MaheshParticipant@bsmitty358gmail-com: I checked the theme with the same plugin (Google Calendar Events) on our server (local) and its is working fine, no such issue. Do you have other plugins installed? Try deactivating plugins one by one and check if the issue resolves.
Let me know if the problem persists.Regards,
MaheshMarch 16, 2016 at 12:38 am #87567[email protected]ParticipantThere is also a custom script on the site to may the flyout in the top right. I have already tried disabling all plugins to no avail.
Have you looked at the site and been able to replicate it?
March 16, 2016 at 9:58 am #87585MaheshParticipant@bsmitty358gmail-com: Checked your site again and noticed that you have a custom script “BudgetBadge” (flyout in the top right) in your site and is enqueued before main jquery library which may have caused the issue. Please enqueue it after enqueing the main jquery library.
Hope this helps.
Let me know if any problem.Regards,
MaheshApril 6, 2016 at 6:51 am #88902[email protected]ParticipantHow would I modify the order that these are loaded?
April 6, 2016 at 9:46 am #88906MaheshParticipant@bsmitty358gmail-com: How have you enqueued the custom script Budget Badge in your theme? Since you are already using a child theme, you can enqueue the script as follows, add the following code in your child theme’s
functions.php
function catchflames_child_enqueue_custom_script(){ wp_enqueue_script( 'budgetbadge', 'http://panthernet.net/wp-content/uploads/2015/11/budgetBadge.js', false ); } add_action( 'wp_enqueue_scripts', 'catchflames_child_enqueue_custom_script' );
Note: Please change the path to the script file to your site’s relative path.
Regards,
MaheshApril 15, 2016 at 10:09 pm #89646[email protected]ParticipantHere is the functions file in my child theme.
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/editor-style-rtl.css' ); wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/editor-style.css' ); wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/rtl.css' ); wp_enqueue_script( 'badge-script', 'http://panthernet.net/wp-content/uploads/2015/11/budgetBadge.js' ); }
Do I need the false declaration?
April 17, 2016 at 11:51 am #89748MaheshParticipant@bsmitty358gmail-com: You can pass the false in last parameter, by default it is set to false.
Regards,
MaheshApril 18, 2016 at 10:55 pm #89846[email protected]ParticipantIf its set to false by default, then what could the issue be?
April 19, 2016 at 9:32 am #89868MaheshParticipant@bsmitty358gmail-com: Can you please send the your admin credential via email @ mahesh [at] catchthemes [dot] com. I’ll have to check on your server.
Regards,
MaheshApril 20, 2016 at 4:54 am #89952[email protected]ParticipantThat’s unfortunately not really a possibility. Is there any other way?
April 20, 2016 at 10:30 am #89970MaheshParticipant@bsmitty358gmail-com: The above code should have worked fine, I tired in on my server and it worked fine. I guess you’ll need to hire a customizer.
Regards,
Mahesh -
AuthorPosts
- The topic ‘Slider not working (jQuery Conflict?)’ is closed to new replies.