Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18282

    How can I do to open all external links in a new tab?.

    I want to do that in the menu of social networks (at the top-right corner) and in the Portfolio. I have added a Portfolio Meta Field to put an external link to download a software, and I want it in a new tab.

    Thanks!

    #98889

    Hey!

    Add following code to js/avia.js after the jquery document.ready code line at the top:

    jQuery("a").filter(function() {
    return this.hostname && this.hostname !== location.hostname;
    }).attr('target', '_blank');

    Regards,

    Peter

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Open links in a new tab’ is closed to new replies.