1

Let me start out by saying my JQuery skills are next to null. I am building a website with wordpress which utilises multiscroll.js. Normally in wordpress I add menu items and can put in links to pages or anchors within a page, however with this site if I put in a page anchor as a menu link, it will scroll the left hand section to that anchor, but not the corresponding right hand section, that remains blank.

You can see a build of the site here: www.mauriceredmond.com/client/beco clearly the navigation can be achieved as the dot-nav on the right hand side does the job perfectly. Any insights into this problem would be greatly appreciated.

Alvaro
  • 40,778
  • 30
  • 164
  • 336
TimmehNZ
  • 91
  • 5

1 Answers1

2

Thanks for your responses. Yes, I fixed the issue by doing the following:

Removing default WordPress menu from header.php and hard coding in my own menu integrating the data-menuanchor as described in the plugin documentation

<ul id="myMenu">
<li data-menuanchor="firstPage" class="active"><a href="#firstPage">First section</a></li>
<li data-menuanchor="secondPage"><a href="#secondPage">Second section</a></li>
<li data-menuanchor="thirdPage"><a href="#thirdPage">Third section</a></li>
<li data-menuanchor="fourthPage"><a href="#fourthPage">Fourth section</a></li>

and then adding these menuanchors into the parameters of the plugin like so:

jQuery('#multiscroll').multiscroll({
anchors: ['firstPage', 'secondPage', 'thirdPage', 'fourthPage', 'lastPage'],
menu: '#myMenu'});

This means that anytime I need to add a menu item, I must hard code it as it cannot be done through the WordPress backend with this method. This is fine for my purposes as the menu will not be changing.

TimmehNZ
  • 91
  • 5