use link of the rel attribute. You can specify the target direction of the source document for this link, This attribute is usually used for Search Engine Optimization and style options. open a link in a new window. You can use the target attribute. if you want all external links to open in a new window? jquery
Add an external link to the target attribute. You can use the attribute selector to use jquery:
1Jquery (Function() {Jquery ('a [rel ~ = External] '). ATTR ('target',' _ blank ');});
This simple Code line Target =" _ blank "
AttributeAddAll external links to your website.However, this should trigger the function when Dom loading is complete.Therefore, the complete code is as follows:
<SCRIPT type = "text/JavaScript">/*<! [CDATA [*/Jquery (document). Ready (Function(){//External linksJquery (Function() {Jquery ('a [rel ~ = External] '). ATTR ('target',' _ blank');});});/*]>*/</SCRIPT>