Hi guys,
I am having some problems with some ajax and css on a project.
I want to make an anchor link to itself.
<a href=“google.com”>google</a>
I now I can also do this
<a onclick=“location.href=‘google.com’;” href=“google.com”>google</a>
But can I make an on click, link to itself? so the onClick will display anything the href displays? I have some ajax on my site that if a button is pressed the href=“google.com” becomes something else, but the onclick src does not change…
So could I do this
<a onclick=“location.href='this.href’;” href=“whateverthisdisplays.com/onclick/willchangetoo”>google.com</a>