Open external links and files in a new window (or tab)

Add the following code to your javascript file to force all the external links in a site to open in a new window (or tab, depending on the user’s browser configuration).

The code also adds classes to Phone, PDF and E-mail links for easier use in CSS (for example, to add icons before or after the link).

Powered by BetterDocs

Newsletter

Subscribe and stay connected through our Newsletter. We send out important news, tips and special offers.

  • This field is for validation purposes and should be left unchanged.