Posted By

markrocky on 04/28/10


Tagged


Versions (?)

add class and target _blank to all external links


 / Published in: jQuery
 

  1. $('a[href^="http://"]').attr({ target: "_blank" }).addClass("external-link");

Report this snippet  

You need to login to post a comment.