SyntaxFix
Write A Post
Hire A Developer
Questions
Maybe bind() would help:
button.bind('click', function() { alert('User clicked'); });