Hi Miguel,

you can use the click trigger of the checkbox:

<form>
  show secret: <input id="checkbox" type="checkbox"/>
  <div id="div">
    secret field: <input type="text" />
  </div>
</from>

$("#div").hide();

$("#checkbox").click(function(){
  if ( this.checked ) {
    $("#div").show();
  } else {
    $("#div").hide();
  }
})

by(e)
Stephan

2009/2/18 shapper <mdmo...@gmail.com>:
>
> Hello,
>
> On a form how can I Show a fieldset when a checkbox is Selected and
> Hide the same fieldset when the same checkbox is unselected?
>
> Thanks,
> Miguel

Reply via email to