My links are javascript functions which show a loader, then navigate to the target link:
<script>
function go(url) {
document.body.innerHTML = "some loader html";
window.location = url;
}
</script>
<a href="javascript:go('test.php');">Click here</a>
However this link wouldn't work when the user right clicks it and wants to navigate to test.php
in a new tab.
I want the link also to function when the user wants to open it in a new tab/window. Is there a javascript/jquery way I can achieve this?
Thanks