JSFiddle - React, Tailwind, and code Playground
by miglio esaud
HTML
<a href="#" class="myButton" data-action="startPaymentOverAction">Start Over</a>
JavaScript
window.startPaymentOverAction=function(event){
alert('action data');
console.log(event);
}
$(function() {
$('.myButton').click(function( event ){
var action = $(this).data('action');
event.preventDefault();
if(action){
window[action](event);
}
});
});