On Mar 24, 10:20 am, expresso <dschin...@gmail.com> wrote:
> I'm wondering how to toggle radiobutton on selected vs. not.  If selected
> show a div via ID.

Radio buttons don't have a selected property, they have a checked
property.

You can add an onclick listener that checks if (this.checked), do
whatever.  That strategy works better on checkboxes though, as radio
buttons are unchecked by selecting a different button or using reset
if they are in a form.

You may want to add the listener to a parent element and let the event
bubble up. The listener can then work out which button is checked and
show/hide stuff accordingly.


--
Rob

Reply via email to