- Posts: 61
- Thank you received: 1
Issue with mobile/responsive menu not working
11 years 5 months ago - 11 years 5 months ago #199609
by miwhel
Issue with mobile/responsive menu not working was created by miwhel
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.4.0
We have just updated a Hikashop site of ours to be responsive. Currently, we have a test version of the site on our development server (URL supplied).
The site adjusts according to the display size and introduces a mobile (burger-style) menu block when the display size reaches mobile proportions. To switch to the mobile menu we use a small block of Javascript in the index.php template to enable the mobile menu at which point the regular menu is hidden. We have used this same block of code on several sites (non-Hikashop) without an issue, but on this Hikashop site when the mobile menu appears the menu button can be clicked but nothing happens. Something is causing it to not work.
This is the code which is placed in the <head> section of the index.php template:
In Hikashop's configuration for Display we have "Use Bootstrap Design" turned off and "Use Chosen Library" turned off as well.
Please can you provide some help as to what in Hikashop will be blocking this script from working correctly as we have used it successfully in non-Hikashop sites.
Thanks in advance.
PS. I hope this is added to the right forum section as I couldn't find one relating to display or menu issues
-- Joomla version -- : 3.4.0
We have just updated a Hikashop site of ours to be responsive. Currently, we have a test version of the site on our development server (URL supplied).
The site adjusts according to the display size and introduces a mobile (burger-style) menu block when the display size reaches mobile proportions. To switch to the mobile menu we use a small block of Javascript in the index.php template to enable the mobile menu at which point the regular menu is hidden. We have used this same block of code on several sites (non-Hikashop) without an issue, but on this Hikashop site when the mobile menu appears the menu button can be clicked but nothing happens. Something is causing it to not work.
This is the code which is placed in the <head> section of the index.php template:
Code:
<script>
$(document).ready(function() {
$(".nav-button").click(function() {
$(".nav-button,.menu_mainNav").toggleClass("open");
});
});
</script>
In Hikashop's configuration for Display we have "Use Bootstrap Design" turned off and "Use Chosen Library" turned off as well.
Please can you provide some help as to what in Hikashop will be blocking this script from working correctly as we have used it successfully in non-Hikashop sites.
Thanks in advance.
PS. I hope this is added to the right forum section as I couldn't find one relating to display or menu issues
Last edit: 11 years 5 months ago by miwhel.
Please Log in or Create an account to join the conversation.
11 years 5 months ago #199620
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Issue with mobile/responsive menu not working
Hi,
It's because you're using one feature which still require mootools and you're not using a jquery noconflict.
So the "$" for the HikaShop slider ; which ask in fact for mootools ; generates a javascript error.
I recommend you to use jQuery noConflict (and do not use "$" like that in your scripts but use the safe ways to use jQuery) or do not use features which could use mootools (like the sliders ; which still require mootools but which will be rewrite as soon as possible).
And don't hesitate to take a look at your javascript console in order to see when you have some javascript errors
Regards,
It's because you're using one feature which still require mootools and you're not using a jquery noconflict.
So the "$" for the HikaShop slider ; which ask in fact for mootools ; generates a javascript error.
I recommend you to use jQuery noConflict (and do not use "$" like that in your scripts but use the safe ways to use jQuery) or do not use features which could use mootools (like the sliders ; which still require mootools but which will be rewrite as soon as possible).
And don't hesitate to take a look at your javascript console in order to see when you have some javascript errors
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: miwhel
Please Log in or Create an account to join the conversation.
11 years 5 months ago #199652
by miwhel
Replied by miwhel on topic Issue with mobile/responsive menu not working
Perfect - thanks for your help Jerome.
I have replaced the $ references in the code with with jQuery and that has fixed the issue.
I have replaced the $ references in the code with with jQuery and that has fixed the issue.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #201408
by florcar
Replied by florcar on topic Issue with mobile/responsive menu not working
Hello
I might have the same problem but didnt edit a custom code for the menu. The menu works on every page except from "Userpage" and two more reachable only through "Userpage". Furthermore is the Main-Menu dasappearing and the logo isnt showing either. You can see the problem in the picture attached to this comment.
Regards
florcar
I might have the same problem but didnt edit a custom code for the menu. The menu works on every page except from "Userpage" and two more reachable only through "Userpage". Furthermore is the Main-Menu dasappearing and the logo isnt showing either. You can see the problem in the picture attached to this comment.
Regards
florcar
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 4 months ago - 11 years 4 months ago #201413
by Mohamed Thelji
Replied by Mohamed Thelji on topic Issue with mobile/responsive menu not working
Hello,
Did you check your JavaScript console to see if you had some error in it ? Without a direct access to the page where you are having your issue we won't be able to fully understand your issue.
Did you check your JavaScript console to see if you had some error in it ? Without a direct access to the page where you are having your issue we won't be able to fully understand your issue.
Last edit: 11 years 4 months ago by Mohamed Thelji.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #201489
by florcar
Replied by florcar on topic Issue with mobile/responsive menu not working
Hi
I can give you a login to my page.
There is indeed a JavaScript error and I dont think I am able to solve that :blink:
Regards
florcar
I can give you a login to my page.
There is indeed a JavaScript error and I dont think I am able to solve that :blink:
Regards
florcar
Please Log in or Create an account to join the conversation.
11 years 4 months ago #201639
by Xavier
Replied by Xavier on topic Issue with mobile/responsive menu not working
Hi,
Yes please give us a link to your website and a test account.
You can send these informations via our contact form, don't forget to give the link of that topic in the message.
Yes please give us a link to your website and a test account.
You can send these informations via our contact form, don't forget to give the link of that topic in the message.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #201646
by Xavier
Replied by Xavier on topic Issue with mobile/responsive menu not working
Hi,
It is possible that the JavaScript error cause the issue, this come from the plugin system "yjsg".
Please try to disable it, or contact the plugin provider to solve that issue.
It is possible that the JavaScript error cause the issue, this come from the plugin system "yjsg".
Please try to disable it, or contact the plugin provider to solve that issue.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202051
by florcar
Replied by florcar on topic Issue with mobile/responsive menu not working
Hi Xavier
Thanks for the help. I had to reinstall this plugin. Now it is working fine.
Regards
florcar
Thanks for the help. I had to reinstall this plugin. Now it is working fine.
Regards
florcar
Please Log in or Create an account to join the conversation.
Time to create page: 0.240 seconds