Open External Links In New Window


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

use "rel" attribute with "external"


Copy this code and paste it in your HTML
  1. $('A[rel="external"]')
  2. .click( function() {
  3. window.open( $(this).attr('href') );
  4. return false;
  5. });

URL: http://css-tricks.com/snippets/jquery/open-external-links-in-new-window/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.