Try: $("input:[EMAIL PROTECTED]").click(function() { alert('radio button clicked'); });
I ran into the same problem - you have to include the radio selector or it won't work. Also you don't need to use bind, you can directly bind the click function using the syntax above. -- Josh ----- Original Message ----- From: "Brad Perkins" <[EMAIL PROTECTED]> To: <discuss@jquery.com> Sent: Friday, March 02, 2007 1:30 PM Subject: [jQuery] Bind event to radio button group > I'm new to jQuery. I'm trying to bind a function to a group of radio > buttons. > > For example, > > $("[EMAIL PROTECTED]").bind("click", > function() { > alert ('radio button clicked'); > } > ); > > should run the function anytime a radio button named 'rb' is clicked > but isn't working. Am I approaching this the wrong way, or is my > jQuery syntax wrong? > > Thanks, > > Brad > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/