animate anchor

3 replies · opened Sep 16, 2016

JjohnjohnSep 16, 2016

Hello,

A very simple question and i probably overlooked a simple sample within the theme files.

How can i create a button that links to an anchor, but when clicking on the button it will animate / smooth scroll to the anchor ?
Similar to the one-page layout where you click on a menu and it will goto the relevant section.
Can this be done with normal buttons and links too?

Example site : http://bit.ly/2cwknSp
I would like the smooth scroll to be on the 'about us' button and the 'second section' button

Thank you in advance

SSemicolon WebSTAFFSep 16, 2016

Hello,

This is Definitely Possible and already available with Canvas. You can find an Example for this on our Live Demos Index Page: http://themes.semicolonweb.com/html/canvas/ (Animated Arrow in the Slider Area). You can apply this Functionality to any Button/Link or basically any Element and will need to simply use the data-scrollto Attribute on the Link Element. Example:

[Scroll to Contact Form](#)

This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.

JjohnjohnSep 16, 2016

Thank you!
Was indeed a very simple question!

Is there also a way to control the speed or type of easing when scrolling to the anchor?

SSemicolon WebSTAFFSep 16, 2016

Hello,

Yes this is Absolutely Possible too! You can simply add data-easing="easeInQuad" and data-speed="600" Attributes.

This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard