Adding Smooth Scrolling Links and Buttons for Anchor Links

Follow

 

Smooth scrolling allows you to jump between areas of your page easily without having manually scroll up and down looking for specific sections. Smooth scrolling works very well when you have an anchor link that you want to be able to jump to quickly from any part of your page.  This is a great feature to add to your page to get your customer to that conversion button right away.

If you’d just like to add an anchor link, skip step 1 of this tutorial and go directly to step 2. However, including the smooth scroll script adds a pleasant animation to the link jump and adds some pizzazz to your page.

Click here to see smooth scrolling in action!

To add smooth scrolling links to your page, we’ll need two steps:



Add the Smooth Scrolling Javascript

  1. Navigate to the page where you’d like to add smooth scrolling and open the page in the Unbounce Builder.
  2. Click on the Javascripts javascripts_button.png button in the bottom left corner of the Builder. A new dialog box will appear.
  3. In the Manage Scripts dialog box:
    1. Add Smooth Scrolling to the Link Name field.
    2. Select Before Body End Tag from the Placement menu.
    3. Paste the script below into the blank field.
  4. Click the Save Code button in the bottom right corner of the dialog box. 

Now that you’ve added the javascript you can create smooth scrolling text links and buttons within the page that link to an anchor.

 

Create Your Smooth Scrolling Anchor Links

Click on the item that you would like to link to, then find the ELEMENT ID section in the bottom of the Properties tab on the right side of the page.

Select and Copy the ID value from the ELEMENT ID section. We’ll use this to create our Anchor Link.

smooth_scrolling_anchor_link.png

  • If you’re using a button for your link, click on the button to which you’d like to add a smooth scrolling link.  Go to the Properties tab and paste the ID value into the CLICK ACTION section URL form field.

smooth_scrolling_click_action.png

  • If you’re using a text link, double click into the text block and select the text that you’d like to turn into a link. Under the Properties Tab, select the Action tab and paste the ID into the URL form field.

smooth_scrolling_text_link.png

Click Save and Publish/Republish Your Page.

Smooth scrolling anchor links should be set up on your page making navigation on your page easier for your customers!



Glossary

Anchor link: A link on a page that brings you to a specific place on the same page.

Was this article helpful?
17 out of 40 found this helpful