I have a javascript function like MyFunc(btn), and I would like to associate a click event to all my button with button1 class in the page to this function. I tried the following code and is not working for me:
$("[EMAIL PROTECTED]'button'].button1").each(function() { this.click(function(){MyFunc(this);}); }); what's wrong with my code? any help would be greatly appreciated.