Html:
<div class="example">
<a href="#">Open this link</a>
</div>
I would like to show a div if the user open the link in the same tab.
Jquery:
$(document).ready(function() {
$('a').click(function() {
$(this).addClass('someclass');
});
});
Example:
The user click on the link, a div appear showing the "loading", and the div disappear naturally when the other page loads.
But, if the user open the link in a new tab, the div appear, but don't desappear, because the user is not going to the other page.
What can i do?