2013-08-09, 21:31:44
(2013-08-09, 08:01:48)shawn_a Wrote: Also there are jquery scripts to do this automatically.
Point taken. With this one from CSS tricks, you could use:
PHP Code:
<script>
$('#nav a').each(function() {
var a = new RegExp('/' + window.location.host + '/');
if(!a.test(this.href)) {
$(this).click(function(event) {
event.preventDefault();
event.stopPropagation();
window.open(this.href, '_blank');
});
}
});
</script>
If your navigational container's id is 'nav'.