Hi I am using the following jquery to make a div cliackable (for page skin ads):
$url = "http://google.com";
$("#toLeft,#toRight").click(
function()
{
window.location = $url;
return false;
});
I need to ensure that when a link is clicked, it is opened in another window. Typically, I use this snippet to make all outside links open in a new window, but it doesnt work with this (due to the jquery generated link):
$("a").filter(function() {
return this.hostname && this.hostname !== location.hostname;
}).attr('target', '_blank');
Any ideas how I can do this?
How about using window.open?