Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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 function

    Thanks!

    #87521
    Mahesh
    Participant

    @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,
    Mahesh

    #87567
    [email protected]
    Participant

    There 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?

    #87585
    Mahesh
    Participant

    @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,
    Mahesh

    #88902
    [email protected]
    Participant

    How would I modify the order that these are loaded?

    #88906
    Mahesh
    Participant

    @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,
    Mahesh

    #89646
    [email protected]
    Participant

    Here 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?

    #89748
    Mahesh
    Participant

    @bsmitty358gmail-com: You can pass the false in last parameter, by default it is set to false.

    Regards,
    Mahesh

    #89846
    [email protected]
    Participant

    If its set to false by default, then what could the issue be?

    #89868
    Mahesh
    Participant

    @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,
    Mahesh

    #89952
    [email protected]
    Participant

    That’s unfortunately not really a possibility. Is there any other way?

    #89970
    Mahesh
    Participant

    @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

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Slider not working (jQuery Conflict?)’ is closed to new replies.