JSFiddle - React, Tailwind, and code Playground

by Shishir Morshed

HTML

<a href="#">alerts one time</a>
<a href="http://www.google.com">alerts two times</a>

JavaScript

$('a').on('click', function (e) {
  e.preventDefault();
  alert('close dialog');
});