Smooth Scrolling Issue

Asked on December 4, 2015 in Customization.

Hey guys, when entering the anchor links into my menu custom links (for scrolling to widget sections), all works fine, except for the layers-pro-accordion anchor (#layers-layers-pro-accordion-3), which scrolls to the top of the page (even when removing one “layers” e.g. #layers-pro-accordion-3) – Suggestions?

(URL: newsite.vitisawards.com)

Cornelius Layers User
Reply
  • Possible Answers to Your Question:

  • 1 Answer(s)
    Answered on December 4, 2015.

    Hi there,

    The jQuery snippet we supply in our tutorials is for ID anchors, not named anchors, If you are using the Custom Anchor field, it creates a named anchor and the snippet would need to be rewritten to account for that (it has been noted on the doc to be updated when we can)

    Hey,

    Not the case, I am using the standard Widget ID (In this case: “#layers-layers-pro-accordion-3”), not a custom anchor.

    Suggestions?

    on December 7, 2015.

    If you right click that widget title and choose Inspect, you can see the ID is #layers-widget-layers-pro-accordion-3 which is what you need to use. You can use link cloaking to hide those if you wish, the following explains the general process using the context of affiliate links but the same technique applies:
    https://yoast.com/cloak-affiliate-links/

    Some hosts just have an option you can enable in your domain settings to make it easier.

    on December 9, 2015.

    Many thanks 😉

    on December 12, 2015.
    Reply