Menu icon Foundation
Multiple magellan on one page?

Hello, I have a problem with multiple magellan, the second one is "working" but it's starting to work at the same time as the first one, so this is a problem for me, can this be fixed?

Here is my codepen: http://codepen.io/woosaj/pen/jWwxZE

multipleMagellan

Hello, I have a problem with multiple magellan, the second one is "working" but it's starting to work at the same time as the first one, so this is a problem for me, can this be fixed?

Here is my codepen: http://codepen.io/woosaj/pen/jWwxZE

Rafi Benkual almost 2 years ago

This is a pretty cool use case! What type of site requires two different sticky side nav's?

Andy Guera almost 2 years ago

I wanted to use this for some documentation, each section could have own sidebar, but I guess this is not possible to work out of the box, this may need some javascript tweaks then?

Chris Oyler almost 2 years ago

it certainly could be fixed, with a pull request or in the future. When I wrote this, 2 separate magellan plugins weren't on my use case radar, so magellan just sweeps the dom for anything with a [data-magellan-target] attribute. That could be changed a bit to look for [data-magellan-target="id-of-magellan-you-want-to-target-this-element"]. that would require the addition of an id to your magellan root element, and slightly more markup to your target elements.

Johannes Mutter over 1 year ago

Same problem here.

I have three sections in my nav (3x <ul>). But magellan highlights the active element in all lists.

@Andy Guera
Have you come up with a solution?


3x Magellan Sticky Navigation

 

EDIT:

I found this script to be very useful:

https://jsfiddle.net/cse_tushar/Dxtyu/141/

hrefferh 8 days ago

Visit https://github.com/zurb/foundation-sites/issues/10712 to find a workaround for multiple Mafellans on one page.

 

Hope that helps.

hrefferh