Support » Plugin: IvyCat AJAX Testimonials » Script Conflict

  • Hi — I have a bunch of scripts for my superfish and hamburger menus. If I disable them, then I can get ivycat testimonials to work. Otherwise when the menu scripts are enabled, then ivycat’s testimonial #1 displays, then this fades out into a blank screen (instead of #2 & #3 etc testimonials).

    The problem is they’re my main menu, so I can’t permanently disable them. Is there any other way I can get ivycat to work?

    thank you! Val

    P.S. here’s the js’s that won’t allow ivycat to work:

    <script src=”1nav/jquery.js”></script>
    <script src=”1nav/hoverIntent.js”></script>
    <script src=”1nav/superfish.min.js”></script>
    <script src=”1nav/velocity.min.js”></script>
    <script>
    (function($){ //create closure so we can safely use $ as alias for jQuery
    $(document).ready(function(){
    // initialise plugin
    jQuery(‘ul.sf-menu’).superfish({
    delay: 1000, // one second delay on mouseout
    animation: {opacity:’show’,height:’show’}, // fade-in and slide-down animation
    speed: ‘fast’, // faster animation speed
    cssArrows: false // disable/enable true/false generation of arrow mark-up
    });
    });
    })(jQuery);
    </script>
    <script>
    jQuery(document).ready(function() {
    // hamburger toggle
    $(“#navwrap”).on(“click”, “.mobile-menu”, function() {
    var myNav = $(‘#menu’);
    if (myNav.is(“:visible”)) {
    myNav.velocity(“slideUp”, function() {});
    } else {
    myNav.velocity(“slideDown”, function() {});
    }
    $(‘.hamburger-menu’).toggleClass(‘hamburger-on’);
    });
    // mobile submenu toggle
    $(“#navwrap”).on(“click”, ‘.sf-menu li’, function() {
    var thisList = $(this);
    if (thisList.hasClass(‘mobileShow’)) {
    thisList.find(‘ul’).velocity(“slideUp”, function() {
    thisList.removeClass(‘mobileShow’);
    });

    } else {
    $(‘.sf-menu li’).removeClass(‘mobileShow’);
    thisList.find(‘ul’).velocity(“slideDown”, function() {});
    thisList.addClass(‘mobileShow’);
    }
    });

    });
    </script>

    https://wordpress.org/plugins/ivycat-ajax-testimonials/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Eric Amundson

    (@sewmyheadon)

    Val,

    How are these scripts added to your pages? Are they being enqueued, or are they just embedded on the page?

    Here’s documentation on enqueuing scripts:
    https://codex.wordpress.org/Function_Reference/wp_enqueue_script

    Are the scripts added as part of a plugin?

    Hi Eric – good to hear from you 🙂 There’s 6 of them in the html, last before </body> e.g.

    </div><!–wrapper–>
    <script src=”1nav/jquery.js”> etc as per above
    </script>
    <?php wp_footer(); ?>
    </body>
    </html>

    No they’re not a plugin. Ivycat’s testimonials is the only plugin I’ve activated.

    For ivycat, I’ve got this in the html template:

    <?php echo do_shortcode(“[ic_do_testimonials quantity=’30’ speed=’6000′ fade_in=’600′ fade_out=’700′ group=’writing’]”); ?>

    Can you perhaps see a solution? I didn’t understand that Function Reference/wp enqueue script, but I’m guessing it doesn’t apply to me because I’m just doing my scripts in the html?

    thanks for your kind help, Val

    The dev page is here – http://dev.greensmoothie.com/ – although you’ll see I’ve de-activated ic_do_testimonials so the menu will work. Paul at sitepoint says “I don’t know if this is the issue but you seem to be using 2 versions of jquery. One at the top and one at the bottom. Only use one version otherwise you will get conflicts.” So I’m just waiting to hear from him which one I can delete!

    Hi Eric – Paul solved it. Apparently wordpress uses jQuery and not $ so when he changed the hamburger function js, the testimonials worked!

    Read from this post on, you’ll enjoy the solution:

    http://community.sitepoint.com/t/need-help-with-superfish-mobile-responsive-menu/193723/48

    all the best, Val

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Script Conflict’ is closed to new replies.