How to make a button *not* link to anything


#1

How do you make a button *not* go to a link?

I want to use a button for slow scrolling,
here: http://unbouncepages.com/julebord
but whenever I leave the target link blank and press the button, the site goes to
http://unbouncepages.com/julebord/clkn//

How do I stop it from doing that?


#2

Set the button’s target to javascript:void.


#3

Hi Daniel,

Jacob’s right on how to make a button not link to anything but I’m not sure that’s what you’re after.

If you’re trying to use a button to link to an anchor within your page, you actually need to add that anchor as the button’s link.

For example, if you had an anchor called “pricing” then you would need to link your button to “#pricing” (without the quotes). Does that make sense?

A button might not work exactly right for smooth scrolling since you can’t get in and edit the button class. Instead, you might want to look at Chester’s comment in our Smooth Scrolling how-to article at: http://support.unbounce.com/entries/2…

He gives some advice on how to use smooth scrolling with images on an Unbounce page.

I hope that helps!