Copy link to clipboard
Copied
Is there specific syntax that would allow me to force viewer to open a particular link in a new tab as opposed the the currently open one?
Thanks
Mike
Wether this opens in a new tab or new window will be dependent on the users browser settings, but this should do what you want it to.
<a class="link">Link</a>
<script type="text/javascript">
$("a.link").on("click",function(){
window.open('www.yourdomain.com','_blank');
});
</script>
Copy link to clipboard
Copied
Wether this opens in a new tab or new window will be dependent on the users browser settings, but this should do what you want it to.
<a class="link">Link</a>
<script type="text/javascript">
$("a.link").on("click",function(){
window.open('www.yourdomain.com','_blank');
});
</script>
Copy link to clipboard
Copied
Adding a Target of _blank to a standard link will also open in a new tab/window...
<a href="yourpage.html" target="_blank">Your Link</a>
You can do that from DW's Properties window with the link selected, click the Target dropdown and choose _blank.
As developers, we don't have control over the user's browser to decide if it will be a new tab or a new window though, that's up to the viewer's settings.