External links open in new window


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

This jQuery code should make all external links from the #content div open in a new window.


Copy this code and paste it in your HTML
  1. $("#content a[href^='http://']").attr('target','_blank');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.