1

I have smooth scrolling working (https://drupal.org/project/scroll_to_destination_anchors) and I have linking to anchors working (https://drupal.org/project/menu_token) but I can't get my desired result of clicking a menu item and then scrolling to the anchor. I only need this to work on the current page - if the anchor is on another page, I am ok with the menu item loading the other page and jumping (not scrolling) to that anchor.

Do you have any idea?

1 Answer 1

2

Solved by using the Void Menu module and using the id of the anchor as one of the void options.

For example, my menu item says "<void2>" where void2 contains the id of the div "#aboutus".

1
  • For future reference, if needed, we did similar here: lockouttagoutprocedures.com. But the main menu merely has <front>#anchor. This way Drupal has a valid menu path, but still an anchor destination. Apr 22, 2014 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.