Buttons to links
The following jquery snippet can turn your buttons into links.
$("button[href]").on("click", function() { window.location = $(this).attr("href"); });
Make sure to place the code above in a $(document).ready() function so that it is loaded after jQuery.
Now all you have to do is add an href tag to your button.
<button href="address">Display</button>
Check it out the button below will take you to aschool.us.
- Login to post comments