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.