the "test" your calling is the one you defined for the function try var test = 'Works!'; $('#action_confirm').click(function(){ alert(test); });
- [jQuery] Pass var to click event Nic Hubbard
- [jQuery] Re: Pass var to click event Steven Yang
the "test" your calling is the one you defined for the function try var test = 'Works!'; $('#action_confirm').click(function(){ alert(test); });