Posted By

gfazioli on 09/14/09


Tagged

jquery blank target


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vagrantradio


jQuery, ultimate target _blank link


 / Published in: jQuery
 

URL: http://www.undolog.com

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

  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>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: iroybot on September 30, 2009

not so ultimate. target is deprecated since the XHTML 1.0 Specs...

You need to login to post a comment.