If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Templates / Make main menu "sticky on scroll" if open

Make main menu "sticky on scroll" if open

Started by amethyst_fairy on 5 Aug 2017, 6:57 PM · Views: 5,845

Results 1 to 4 of 4
5 Aug 2017, 6:57 PM
#1
amethyst_fairy avatar

amethyst_fairy

Zen Follower

Join Date:
Feb 2016
Location:
Salem, NH
Posts:
103
Plugin Contributions:
0

Post #1 by amethyst_fairy

Was wondering is there any way to make the main menu sticky on scroll if open.

Thanks
Sandria

https://www.thedragonskeep.net

7 Aug 2017, 12:08 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #2 by mc12345678

Sure, concept I can think of would be to use javascript/jquery to alter the css tags of the menu upon it being expanded so that the menu becomes "detached" and floating. Problem with using just the open perspective is that most such menus will auto hide once the mouse has left the menu. In that case, the menu would return to its normal position and the entire operation would need to be reperformed. So, may want to rethink the criteria a little, especially if/when on a mobile device.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

7 Aug 2017, 12:58 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #3 by lat9

I got a bunch of "ideas" by simply googling sticky header.

10 Aug 2017, 12:46 AM
#4
amethyst_fairy avatar

amethyst_fairy

Zen Follower

Join Date:
Feb 2016
Location:
Salem, NH
Posts:
103
Plugin Contributions:
0

Post #4 by amethyst_fairy

I've been trying all day not going to lie. Having trouble figuring out how to keep slimmenu and either make the categories under Shop lock or go to 3-4 columns so people can see. I have tried integrating some of mega-menu code but didn't work have the stick-anything.js but don't know where to put the stickthis;() because of the categories being automatically generated by the slimmenu code in the tpl.mobile.categories. On site https://www.thedragonskeep.net you'll see the shop dropdown goes down past the half of page so either need to break it up in columns or find away to make it stick. It sticks on the mobile so I am guessing I am missing something totally simple. Any pointers would be appreciated.
Thanks
Sandria