JSFiddle - React, Tailwind, and code Playground

HTML

<a href="http://google.com" id="google">Google</a>
<a href="http://yahoo.com" id="yahoo">Yahoo</a>

JavaScript

$(function(){

var windows = {};
$('a').click(function(e){
    var url = $(this).attr('href');
    var name = $(this).attr('id');
    if(windows.hasOwnProperty(name) && !windows[name].closed ) 
    {
       windows[name].focus();   
    }
    else  
    {
       windows[name]=window.open (url,name,"status=1,width=300,height=300");
    }    
});

});