Bit of help needed.. I'm sure it's quite simple..?
Hi all, I'm trying to use a snippet of code which turns the entire div clickable, however, I'd also like the target to open up in a new window..
This is the code:
-
$(".rightContent").click(function(){
window.location=$(this).find("a").attr("href"); return false;
});
I tried changing it to window.open but to no avail..
I'm also using this:
-
$("a[href*='http://']:not([href*='"+window.location.hostname+"'])").attr("target","_blank");
But has no effect on the particular divs I'm trying to get to open in a new window.. If someone could point me in the right direction, that'd be fantastic!
Thank you
