The Problem
When building out a test site where we might not have a lot of real content yet, we often want to create a bunch of quick links buttons so designers can get a feel for what content is going to look like. This is particularly important when you want to review a bunch of designs and test them on mobile. Typically I would create buttons that would link to my favorite external sites like Microsoft.com and Weather.com. On sites with 15 buttons that got a little boring.What would be better?
What typically happens in HTML, an anchor tag will be created with just a # in the link which tells the browser to create the button and make it work like a button but don't actually link anywhere. If we could add that # to the link life would be great!
So why are you telling me this?
The quick links and other button web parts have a validation in them that prevent us from just adding a #.
The Solution
First we add the web part to the page and add a link.
Then we type a # into the paste a link section. You will notice that the "Open" button never clears validation so it cannot ever be clicked.
If we type in a valid URL the button validation clears. If you are following along, don't press open yet!
Now we just need to go back, erase our URL and replace it with the #. Our button remains clickable.
Now we have ourselves a beautiful, clickable button to nowhere.
In conclusion, this is one extra step to make a button that goes nowhere but when you are testing design, it is really nice when you click a button and the browser stays right where you want it.
No comments:
Post a Comment