fullmoon2
Technical User
- Aug 14, 2005
- 20
I have some images in each <li><a href="...>
and with the code below I got a swap effect on the images and if you click on them, a new page comes up. But.. the new page shows in the same window. That's the problem!
$("ul.thumb li a").click(function() {
var mainImage = $(this).attr("href");
location.href = mainImage;
return false;
});
I've tried to google "target_blank javascript", and found f.ex
location.href(target = _blank);
or
window.open(this.getAttribute('href'), '_blank');
But both of them opens the new page into a new, and the same window.
Can anyone help?
and with the code below I got a swap effect on the images and if you click on them, a new page comes up. But.. the new page shows in the same window. That's the problem!
$("ul.thumb li a").click(function() {
var mainImage = $(this).attr("href");
location.href = mainImage;
return false;
});
I've tried to google "target_blank javascript", and found f.ex
location.href(target = _blank);
or
window.open(this.getAttribute('href'), '_blank');
But both of them opens the new page into a new, and the same window.
Can anyone help?