JSFiddle - React, Tailwind, and code Playground
HTML
<a href="http://google.com"><div id="google">This is Google.</div></a>
<a href="http://youtube.com"><div id="youtube">This is YouTube.</div></a>
<br />
<button id="btn">Open both</button>
JavaScript
$('#btn').on('click', function() {
$('a').each(function() {
window.open(this.href, '_blank');
});
});