JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-2.2.3.js"></script>
<div id="container1">
<a href="http://google.com" target="blank">This will open a new tab</a>
</div>

<div id="container2">
<a href="http://google.com" target="blank">This will not</a>
</div>

JavaScript

$("#container1").mousedown(function(event) {
  return false;
});

$("#container2").mousedown(function(event) {
  alert('alert');
  return false;
});