Event Listener Firing Too Early When Parameters Are Passed
I pass a number of parameter to a javascript function which builds a form for the user to fill in. Among these parameters are two more functions contained in a separate class whic
Solution 1:
You have to wrap your method calls in function blocks, otherwise they are evaluated immediately:
$("#cancelButton").live("click", function () { cancelFunction(p1, p2); });
Post a Comment for "Event Listener Firing Too Early When Parameters Are Passed"