Issue with mobile/responsive menu not working

  • Posts: 61
  • Thank you received: 1
10 years 3 months ago #199609

-- 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:

		<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: 10 years 3 months ago by miwhel.

Please Log in or Create an account to join the conversation.

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
10 years 3 months ago #199620

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,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: miwhel

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 1
10 years 3 months ago #199652

Perfect - thanks for your help Jerome.

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.

  • Posts: 62
  • Thank you received: 1
10 years 3 months ago #201408

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

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 3 months ago #201413

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.

Last edit: 10 years 3 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 62
  • Thank you received: 1
10 years 3 months ago #201489

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

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 3 months ago #201639

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.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 3 months ago #201646

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.

Please Log in or Create an account to join the conversation.

  • Posts: 62
  • Thank you received: 1
10 years 3 months ago #202051

Hi Xavier

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.174 seconds
Powered by Kunena Forum