[jQuery] How to Open Links to External Sites in a New Window

Tadashi Shigeoka ·  Sun, November 27, 2011

I’ll introduce how to open links to external sites in a new window using jQuery.

jQuery

jQuery sample code to open links to external sites in a new window

$(document).ready( function () {
  $('.popup').click(function(){
    window.open(this.href, "WindowName","width=1000,height=600,resizable=yes,scrollbars=yes");
    return false;
  });
});

That’s all from the Gemba.