Thanks Josh and Brandon!! That did the trick!

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Brandon Aaron
Sent: Wednesday, March 21, 2007 1:11 PM
To: jQuery Discussion.
Subject: Re: [jQuery] toggle a div based on clicking a specific radio button


On 3/21/07, Josh Nathanson <[EMAIL PROTECTED]> wrote: 

Hi Andy,
 
My approach with radio buttons:
- Bind a click function to the group
- when clicked, check the value - if it's the one you want, show -
otherwise, hide
 
$("[EMAIL PROTECTED]").click(function() {
if(this.value == 'm') {
    $('#manual').show("fast");
}
else {
 $('#manual').hide("fast");
}



The above could also be written as this:

$("[EMAIL PROTECTED]").bind('click', function() { 
    $('#manual)[this.value==m?'show':'hide']('fast'); 
});

--
Brandon Aaron



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to