How can I execute a Javascript function when a link to an anchor is used?
I have this anchor:
<a id="localizacao" onClick="toogleShow('local')">Click here to show hidden content</a>
The user can click on this anchor to show hidden content but I would like to automatically show the content when the user clicks this link that is in another page:
<a href="info.html#localizacao"><img src="dcc.png" alt="Localização" title="Localização"></a>
You can use
window.onhashchangeMDN