2
I’m making a website and I have a link that, in addition to sending a message when it is clicked, uses an anchor to put the section of the site in the spotlight.
I’m doing it this way:
<a href="/alerta#destaque">Gerar Alerta</a>
This way, when the user clicks on the link, an alert is generated and the page "descends" to a div with the id "highlight" that shows the content of the generated alert.
The alert is generated from a Jquery function.
My problem is that this link only works once. The first time I click, everything happens right. Only if I click again on the link nothing happens.
I realized that if the anchor link is visible in the URL the link action does not work.
How could I solve this problem?
Guy edits your question as your code, it’ll make it easier for someone to answer you. Edit and place the HTML/CSS and JS, talk if using plugins or jquery etc.
– hugocsl