Close

Change responsive from 980px width to 768px width

JRon
9 years ago
#8940 Quote
Avatar
  • 67
Hi there
I would like to change the mega menu from going to responsive mode in 980px width, I would like it to change to responsive mode when the site width is 768px

It´s in a script somewhere if I remember correctly but cant figure out how to change it, can you point me in the right direcion?
Deni
9 years ago
#8942 Quote
Avatar
  • Moderator
  • 389
Rönning wrote:
Hi there
I would like to change the mega menu from going to responsive mode in 980px width, I would like it to change to responsive mode when the site width is 768px

It´s in a script somewhere if I remember correctly but cant figure out how to change it, can you point me in the right direcion?


Hi, 

You will find it in this file: \Plugins\SevenSpikes.Nop.Plugins.Core\Scripts\SevenSpikesExtensions.js. The beginning of the file contains this:

var breakPointWidth = 980

Edit it to be 

var breakPointWidth = 768

That is all. Note that this may lead to unexpected behaviour of any other elements on the page.
Best Regards,
Mladen Staykov
Nop-Templates.com
JRon
9 years ago
#8943 Quote
Avatar
  • 67
Thanks for the reply, I had tried changing that setting (confirmed in browser that the script value had changed to 768) but nothing changed, I´m going to check my css settings if they are also causing this to switch at 980px, My mega menu is heavily modified I just wanted to clarify where it changed in the script, too much work to troubleshoot if it would not  be the right place.

I had to manually add in css hiding of the menu/responsive-menu after my change to 3.5 because otherwise on slow connections people could see both menus before the script hid the menu that was supposed to be hidden depending on the viewport
Deni
9 years ago
#8947 Quote
Avatar
  • Moderator
  • 389
Rönning wrote:
Thanks for the reply, I had tried changing that setting (confirmed in browser that the script value had changed to 768) but nothing changed, I´m going to check my css settings if they are also causing this to switch at 980px, My mega menu is heavily modified I just wanted to clarify where it changed in the script, too much work to troubleshoot if it would not  be the right place.

I had to manually add in css hiding of the menu/responsive-menu after my change to 3.5 because otherwise on slow connections people could see both menus before the script hid the menu that was supposed to be hidden depending on the viewport


Hi, 

As you can see in the MegaMenu.css file in the plugin, there are already CSS rules for hiding the menus. You just need to modify the Media Query to be 768px. I hope this helped !
Best Regards,
Mladen Staykov
Nop-Templates.com
JRon
9 years ago
#8951 Quote
Avatar
  • 67
Thanks for the help,
the settings I needed to change where in the MegaMenu.css file, there was an jquery event that I had bound to the megamenu and I was confusing it with why  had to change this via script but not css.

Thanks again