Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #507235

    I understand that this support request might be outside of the support you are able to offer but I have run out of options.

    FILE I HAVE EDITED: helper-main-menu.php

    <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js”></script&gt;
    <script>
    $(document).ready(function(){
    $(“.flip”).click(function(){
    $(“.panel”).slideToggle();
    });
    });
    </script>

    <p class=”flip”><span class=”icon”></span><span class=”label”>Menu</span></p>
    <div class=”panel” style=”display: none;”><?php
    echo do_shortcode(‘[accordionmenu id=unique2354174 accordionmenu=33817]’);
    ?>

    I can add the above code and everything works perfectly, the issue is that the pop-out cart menu (the one that shows what products are in the cart) stops working.

    I have no idea why and I have attempted several suggestions from Google searches.

    Can anyone here provide me some help please.

    #507247

    Hi Luke86!

    Not really sure what your trying to do but you do not need this line.

    <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js”></script>
    

    We already enqueue jQuery that gets included with WordPress so if you link to another copy it will cause javascript errors.

    Regards,
    Elliott

    #509974

    The issue is with this code conflicting with the pop-out menu for the shopping basket:

    <script>
    $(document).ready(function(){
    $(“.flip”).click(function(){
    $(“.panel”).slideToggle();
    });
    });
    </script>

    #510302

    Hi!

    Can you please post the link to your page where we can see the issue?

    Cheers!
    Yigit

    #510307

    Hi!

    Also, you’ll want to replace “$” with “jQuery” like so.

    jQuery(document).ready(function(){
    jQuery(“.flip”).click(function(){
    jQuery(“.panel”).slideToggle();
    });
    });

    Best regards,
    Elliott

    #512747

    http://www.o-mills.co.uk/shop/

    Full width the basket no longer shows the pop-out (contents of the basket and the price etc).

    When on mobiles, I have it setup to show a different style of menu using shortcodes and a plugin I installed.

    The code I added was:

    <script type=”text/javascript” src=”http://code.jquery.com/jquery-1.10.1.min.js”></script&gt;
    <script type=”text/javascript”>
    jQuery(document).ready(function() {
    jQuery(“.flip”).click(function() {
    jQuery(“.panel”).slideToggle(“slow”);
    });
    });
    </script>

    <p class=”flip”><span class=”icon”></span><span class=”label”>Menu</span></p>
    <div class=”panel” style=”display: none;”><?php
    echo do_shortcode(‘[accordionmenu id=unique2354174 accordionmenu=33817]’);
    ?>

    It all works perfectly apart from this conflict that stop the pop-out basket appearing on desktops and laptops. Mobile/tablet isn’t an issue because I use display:none to hide them.

    I have searched for alternative ways to implement the jQuery show/hide menu on mobiles but everyone has the same issue.

    #513850

    Hello,

    Have you tried disabling all third-party plugins to see if it gets fixed?

    Regards,
    Josue

    #513857

    Yeah, same issue stands.

    I don’t understand why I cannot use this simple jQuery code without things breaking. Especially when it appears that enfold uses the same version of jQuery as the script I want to use!

    #514318

    Hey!

    does your jQuery code work well with a default WordPress theme?

    Regards,
    Andy

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.