JSFiddle - React, Tailwind, and code Playground
HTML
<a id="link" href="google.be">test</a>
JavaScript
$('#link').on('click',function(e){
e.preventDefault();
//am I going to the url?
alert("I'm not going sir!");
});
<a id="link" href="google.be">test</a>
$('#link').on('click',function(e){
e.preventDefault();
//am I going to the url?
alert("I'm not going sir!");
});