• Resolved emanuele2783

    (@emanuele2783)


    Hello, I created a button with wp bakery builder that when clicked takes you to a specific point of the page (I used the element ID to do that). I am not able to use the feature of scrolling smoothly offered by your plugin for this button, it jumps directly to the point. I am sure that the plugin works because I put a link on a word in a text part of the page and the scroll works correctly. Do you have any suggestion or instruction that can help me to reach the goal? Thank you very much

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author malihu

    (@malihu)

    Hi,

    Which button in which page?

    Thread Starter emanuele2783

    (@emanuele2783)

    The page is this:
    https://www.tenerife-trips.com/product/water-sports/jet-ski-tenerife/

    The button is the one “PRICES” in the middle of the page just below “SCHEDULE & PICKUP SERVICE”.

    Basically the idea is to take users to the prices at the bottom of the page when they click that button.

    I have called “prices jet ski” the element ID of the empty space just above the yellow area where the prices are. Then I put as URL of the button “#prices jet ski”.
    I can see that it works, but it jumps to the point not scroll (it works even when the plugin Page scroll to id is deactivated).

    Plugin Author malihu

    (@malihu)

    Spaces are not allowed in html id attributes. Your id is prices jet ski and your link URL is #prices jet ski, which then becomes #prices%20jet%20ski by the browser’s rendering engine, as spaces are replaced with %20 since they are invalid characters.

    Change your id to:

    prices-jet-ski

    and your link’s URL to:

    #prices-jet-ski

    and everything will work.

    You should only use letters, numbers, - and _ in ids.

    Let me know

    Thread Starter emanuele2783

    (@emanuele2783)

    Yes now it works, thank you very much.
    It works also when the plugin Page scroll to id is deactivated, is that normal?

    Plugin Author malihu

    (@malihu)

    It’s probably another script in your theme that hijacks smooth scrolling.

    Go to plugin settings and enable “Prevent other scripts from handling plugin’s links” option and set the “Prevent other scripts from handling plugin’s links selector(s)” field value to:

    a[href*='#']:not([href='#'])

    Also, since you have a sticky top header menu, set the “Offset” option value to:

    #site-header

    Save changes and let me know so I can test it.

    Thread Starter emanuele2783

    (@emanuele2783)

    Actually I deleted the plugin Page scroll to id and it still works fine now, so I suppose my theme already offers such scroll?!
    Thanks a lot anyway for your help

    Plugin Author malihu

    (@malihu)

    Yes. If you don’t want plugin’s functionality like offsetting your sticky menu, scrolling to target from/to different pages etc. you can do without it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Button link with WP Bakery Builder’ is closed to new replies.