Open extenal links in new window


/ Published in: jQuery
Save to your folder(s)

Add rel="external" on link you would like to open in a new window


Copy this code and paste it in your HTML
  1. jQuery(document).ready(function () {
  2. jQuery("a[rel='external']").each( function(i) {
  3. jQuery(this).attr("target","_blank");
  4. });
  5. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.