Something like
<a href="www.somewhere.com">Click here.</a>
<div class="button">Button</div> /* when pressed, "href" link changes */
And when the button is pressed. the "www.somewhere.com" gets changed to a differend URL?
Thanks.
Something like
<a href="www.somewhere.com">Click here.</a>
<div class="button">Button</div> /* when pressed, "href" link changes */
And when the button is pressed. the "www.somewhere.com" gets changed to a differend URL?
Thanks.
Yes. Select the button and change the href
attribute.
$("button").on("click", () => {
$("a").attr("href", "newlink");
});