PDJ EVOL AVRIL 2015

by corinnekm

HTML

<label><input type="checkbox" name="sample" class="selectall"/>Toutes les positions</label>
<label title="selectionne totues les ..."><input type="checkbox"    name="sample" class="selectMDT"/>Positions Mandat Juge Commissaire</label>

<div id="checkboxlist">
    
   
    <label><input type="checkbox" class="MDT" name="sample[]"/>Sauvegarde</label><br />
    <label><input type="checkbox" class="MDT" name="sample[]"/>Redressement</label><br />
    <label><input type="checkbox" name="sample[]"/>Plan de sauvegarde</label><br />
     <label><input type="checkbox" name="sample[]"/>Plan de redressement</label><br />
    <label><input type="checkbox" name="sample[]"/>Plan de cession</label><br />
    <label><input type="checkbox" class="MDT" name="sample[]"/>Liquidation</label><br />
    <label><input type="checkbox" name="sample[]"/>ClĂ´ture</label><br />
    
</div>

CSS

div {
   
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 10px;
    margin-top: 10px;
    width: 500px;
}

input {
    padding-right: 10px;
}

JavaScript

$('.selectall').click(function() {
    if ($(this).is(':checked')) {
        $('div input').attr('checked', true);
        $('input.selectMDT').attr('checked', true);
        
    } else {
        $('div input').attr('checked', false);
        $('input.selectMDT').attr('checked', false);
    }
});
$('.selectMDT').click(function() {
    if ($(this).is(':checked')) {
        $('div input.MDT').attr('checked', true);
    } else {
        $('div input.MDT').attr('checked', false);
    }
});