-
AuthorPosts
-
September 22, 2015 at 5:13 pm #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>
<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.
September 22, 2015 at 5:30 pm #507247Hi 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,
ElliottSeptember 28, 2015 at 12:05 pm #509974The 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>September 28, 2015 at 5:19 pm #510302Hi!
Can you please post the link to your page where we can see the issue?
Cheers!
YigitSeptember 28, 2015 at 5:22 pm #510307Hi!
Also, you’ll want to replace “$” with “jQuery” like so.
jQuery(document).ready(function(){ jQuery(“.flip”).click(function(){ jQuery(“.panel”).slideToggle(); }); });
Best regards,
ElliottOctober 2, 2015 at 1:03 pm #512747http://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>
<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.
October 5, 2015 at 3:09 pm #513850Hello,
Have you tried disabling all third-party plugins to see if it gets fixed?
Regards,
JosueOctober 5, 2015 at 3:13 pm #513857Yeah, 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!
October 6, 2015 at 12:02 pm #514318Hey!
does your jQuery code work well with a default WordPress theme?
Regards,
Andy -
AuthorPosts
- You must be logged in to reply to this topic.