JSFiddle - React, Tailwind, and code Playground
HTML
<button>btn</button>
JavaScript
function one() {
alert('one called');
}
function two() {
alert('two called');
}
function three() {
alert('three called');
}
jQuery("button").bind("click", function() {
var funcName = "one";
window[funcName]();
//alert('here');
});