toggle show and hide div on check box click

toggle show and hide div on check box click

I have a group of CheckBox's 
  1. each one toggle display or hide a special div 
  2. and if i click on check box is checked then i need to uncheck this check box and undisplay the div.
How i can do that  i am still new ti jQuery




this is my function :
$(document).ready(function(){
        $("input:checkbox").click(function() {
            var checkboxgroup = "input:checkbox(name='" + $(this).attr("name") + "')";
            $(checkboxgroup).attr("checked", false);
            $(this).attr("checked", true);
            
            var divpart = $(this).attr('id');
            $(divpart).toggle();
        });
        
    });