I am having trouble passing a variable into a function used within a click event. I am doing the following:
var test = 'Works!'; $('#action_confirm').click(function(test) { alert(test); }); I keep getting undefined. What am I doing wrong?
I am having trouble passing a variable into a function used within a click event. I am doing the following:
var test = 'Works!'; $('#action_confirm').click(function(test) { alert(test); }); I keep getting undefined. What am I doing wrong?