I am trying to pass a function name and its parameters as parameter and call it
Here is the code
$(document).ready(function(){
runfn(getUserName,paramValue);
});
function runfn(fnName,param){
fnName(param);
};
function getUserName(userId){
alert(userId);
};
Feel free to edit this fiddle
i want to call function with parameters using this method