SO - 20639135
by Arun P Johny
HTML
<button>btn</button>
JavaScript
function one() {
alert('one called');
}
function two() {
alert('two called');
}
function three() {
alert('three called');
}
jQuery(function () {
jQuery("button").bind("click", function () {
var funcName = "one";
window[funcName]();
//alert('here');
});
})