New Window (JQuery)

language: jQuery (JavaScript)
license: Other

Code for Snippet:

$('a[rel=external]').click(function() {
  var newWindow =$(this).attr('href'), '_blank');
  if(newWindow) { if(newWindow.focus) { newWindow.focus(); return false; } }
  newWindow = null;
comments powered by Disqus


Link to this snippet:

Download to Code Collector

To use the direct link to your snippet on either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 252
Date Added: 2009-08-15 11:45:01
Last Modified: 0000-00-00 00:00:00

Web Analytics