Hello,

I need to make a dynamic form. This morning I found jquery and this
looks like the tool I need.

My first challenge is unfolding part of a form on a checked
checkbutton. The code I wrote does
not work. Can someone point me in the right direction?


 <script type="text/javascript">
   $(function() {
       jQuery.fn.extend({
         check: function() {
             return this.each(function() { this.checked = true; });
           },
             uncheck: function() {
             return this.each(function() { this.checked = false; });
           }
         });
     $('a#period').click(function(){
                             if ($("[EMAIL PROTECTED]").check() ==
true){
                               $('#showperiod').show();
                             } else {
                               $('#showperiod').hide();
                             }
                           });
     });
    </script>

The checkbox is in an anchor (id="period"), and the id that must be
unfolded is showperiod.

Thank you

Reply via email to