I think I like this one better. Removed the anchor tag, and used this.checked (DOM object) I tend to rewrite stuff a lot with Jquery, I guess thats part of the learning.
<script> $(document).ready(function() { $(':checkbox').click(function(){ if(this.checked) $('#showtime').show(); else $('#showtime').hide(); }); }); </script> </head> <body> <INPUT TYPE="checkbox" NAME="limit" VALUE="y"><I>set report period</ I> <div id="showtime"> [....] </div> On Dec 11, 3:12 pm, ksun <kavi.sunda...@gmail.com> wrote: > Welcome to JQuery. Try this > > <script> > $(document).ready(function() > { > $('#time').click(function(){ > if($('input[type="checkbox"]').attr('checked')) > $('#showtime').show(); > else > $('#showtime').hide(); > } > ) > > }); > > </script> > </head> > <body> > <a href="#" id="time"><INPUT TYPE="checkbox" NAME="limit" > VALUE="y"></ > a><I>set report period</I> > <div id="showtime"> > [....] > </div> > > On Dec 11, 2:21 pm, frits1607 <v...@vulkor.net> wrote: > > > > > On Dec 11, 6:47 pm, Paul Mills <paul.f.mi...@gmail.com> wrote: > > > > Hi, > > > > This selector looks a bit strange $('a#period'). > > > > Can you post the relevant HTML code please. > > > > Paul > > > Paul, > > It looks like this: > > > <a href="#" id="time"><INPUT TYPE="checkbox" NAME="limit" VALUE="y"></ > > a><I>set report period</I> > > <div id="showtime"> > > [....] > > </div> > > > It looks a bit funny, but I do not know what is wrong.- Hide quoted text - > > - Show quoted text -