jQuery, ultimate target _blank link


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

This version add a special class to avoid external link icon in specify link


Copy this code and paste it in your HTML
  1. $('a[target=_blank]').not('.notarget').addClass('external');
  2.  
  3. // html markup
  4.  
  5. <a target="_blank">I have the external (class) icon</a>
  6. <a target="_blank" class="notarget">I have not the external (class) icon</a>

URL: http://www.undolog.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.