Hi,

Thanks it works, I have the code as below, since more than one
checkbox can be selected at once I've used the click function, and
also changed the radio to click function as well.

This way I can get it work the way I intent to, like two option either
one public or private, so for ex when selected public the label is
class=hilite, so when I click on public again label class is still
hilite, and when I click on private then the hilite class is removed
from public and applied to private, just the way I want it to work.
The idea is to hide the input using display:none, so the labels are
only visible and user interacts by click on the labels and selecting
the option.

Once again thanks and appreciate your help, without which I couldn't
have come this far. And one more (not the last ;-)) request it would
be great if you can point me a novice to some good tutorial or
reference for coding jQuery like a beginners guide or something basic
to start with.

 Ciao,

-------------------------------------
<script>
 $(document).ready(function(){
$("input[type=radio]:checked + label").addClass("hilite");
$("input[type=radio]").click(function () {
$(this).parent().find("label.hilite").removeClass("hilite");
var id = $(this).attr("id");
$("label[for="+ id + "]").addClass("hilite");

if ( $(this).val() == "public" )
    $(this).parent().find("div.tags").hide();
else
    $(this).parent().find("div.tags").show();
});

        $("input[type=radio]:checked[value='public']").parent().find
("div.tags").css("display","none");


        $("input[type=checkbox]:checked + label").addClass("hilite");
    $("label").click(function () {
      $(this).toggleClass("hilite");
    });

 });
  </script>
-------------------------------------

Reply via email to