Automatic external link open in New Window

    [javascript]
    $(‘a’).each(function() {
    var a = new RegExp(‘/’ + [removed].host + ‘/’);
    if(!a.test(this.href)) {
    $(this).click(function(event) {
    event.preventDefault();
    event.stopPropagation();
    window.open(this.href, ‘_blank’);
    });
    }
    });
    [/javascript]

    Leave a Reply