Alex's code was doing the equivalent of:
$(".btnSave").click("editElementNameSave");
The click() function, like all event functions, expects to receive a
*reference* to a function, not the *name* of a function.
Your code is doing the equivalent of:
"editElementNameSave"();
You can't call a st
I have tried this:
var handler = "editElementName";
function editElementNameSave()
{
alert('Hurray!');
console.log(1);
}
function showModalBox(handler)
{
$(".1").click(function(){
console.log(2);
(handler + "Save")();
2 matches
Mail list logo