Target _blank with jquery


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



Copy this code and paste it in your HTML
  1. //Open external links in a new window/tab
  2. $("a[href^='http://']").attr("target","_blank");

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.