JSFiddle - React, Tailwind, and code Playground
by jashwant
HTML
<a href="javascript:submit()">submit</a>
JavaScript
jQuery(function() {
$('a').each(function() {
var $this = $(this);
var href = $this.attr('href');
$this.attr('href','javacript:void(0);');
$this.data('href',href);
}).click(function() {
var href = $(this).data('href').replace('javascript:','');
console.log(href);
eval(href);
});
});