Menu icon Foundation
Cannot read property 'scrollToLoc' of undefined

Hi,

I'm using JointsWP (http://jointswp.com/docs/) on a WordPress site and trying to implement Magellan on a page but am getting the following error:

foundation.magellan.js:286 Uncaught TypeError: Cannot read property 'scrollToLoc' of undefined
    at e.value (foundation.magellan.js:286)
    at HTMLAnchorElement.<anonymous> (foundation.magellan.js:255)
    at HTMLUListElement.dispatch (jquery.js?ver=1.12.4:3)
    at HTMLUListElement.r.handle (jquery.js?ver=1.12.4:3)

The closest thing I found was this Google search result: https://github.com/zurb/foundation-sites/issues/10502 which suggested that moving smoothScroll.js should be loaded prior to Magellan. Unfortunately, this doesn't work for me . The site is only on my local machine, but here is a sampling of the code that I am using 

<ul class="menu expanded" data-magellan>
    <li><a href="#overview">Overview</a></li>
    <li><a href="#amenities">Amenities</a></li>
    <li><a href="#">Photos</a></li>
    <li><a href="#rates">Rates & Availability</a></li>
</ul>

Any help is appreciated.

 

 Thank you!

 

 

Magellanjointswp

Hi,

I'm using JointsWP (http://jointswp.com/docs/) on a WordPress site and trying to implement Magellan on a page but am getting the following error:

foundation.magellan.js:286 Uncaught TypeError: Cannot read property 'scrollToLoc' of undefined
    at e.value (foundation.magellan.js:286)
    at HTMLAnchorElement.<anonymous> (foundation.magellan.js:255)
    at HTMLUListElement.dispatch (jquery.js?ver=1.12.4:3)
    at HTMLUListElement.r.handle (jquery.js?ver=1.12.4:3)

The closest thing I found was this Google search result: https://github.com/zurb/foundation-sites/issues/10502 which suggested that moving smoothScroll.js should be loaded prior to Magellan. Unfortunately, this doesn't work for me . The site is only on my local machine, but here is a sampling of the code that I am using 

<ul class="menu expanded" data-magellan>
    <li><a href="#overview">Overview</a></li>
    <li><a href="#amenities">Amenities</a></li>
    <li><a href="#">Photos</a></li>
    <li><a href="#rates">Rates & Availability</a></li>
</ul>

Any help is appreciated.

 

 Thank you!

 

 

This post has been closed. No new replies can be added.

Christopher Martinez 11 days ago

Um, so yeah, this does work. Re-ran  

npm run build

and it works as expected. So to anyone who stumbles across this, move smoothScroll.js before magellan.js and rebuild.