Is there a way in jquery to my browser is not moved by clicking on a link to the new window, so I just stayed in the open window.
Just as it is on the page:
http://www.netvouchercodes.co.uk/expiring-voucher-codes
when you click the Get code & visit, we are on the home page and a window opens in the background.
How do you modify my code to make it work:
Html:
<a href="http://www.yoursite.com/otherLink" class="yourLink">Click here</a>
Jquery:
$('a.yourLink').click(function(event) {
$(this).next('.hiddenDiv').show();
window.open(this.href, '_blank');
$(this).remove();
return false;
});
CSS
.hiddenDiv{
display:none;
}