Bonjour,
J'ai un léger soucis avec mon slideToggle en effet lorsque je veux cliquer sur une de mes checkbox , j'aimerais que un contenue apparaisse .
Mon code JS marche nickel sur un slideToggle avec un texte .
Voici le code HTML
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<div class="sublist">
    <div class="row">
        <div class="col-md-4">
            <?php echo $this->Form->input('metier[]','BanqueFinance',array('type'=> 'checkbox'));?> // ce sont mes checkbox
            <div class="subsublist">TEST</div>
            <?php echo $this->Form->input('metier[]','Multinationalindustrie',array('type'=> 'checkbox'));?>
            <div class="subsublist">TEST</div>
            <?php echo $this->Form->input('metier[]','Horlogerie',array('type'=> 'checkbox'));?>
            <?php echo $this->Form->input('metier[]','Immobilier',array('type'=> 'checkbox'));?>
            <?php echo $this->Form->input('metier[]','Négociation international',array('type'=> 'checkbox'));?>
            <?php echo $this->Form->input('metier[]','Autre',array('type'=> 'checkbox'));?>
        </div>
    </div>
</div>
Voici le code JS
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
$('.subsublist').hide();
$('.sublist').change(function() {
    jObj = $( this ).next( '.subsublist' ).eq(0);
    $( '.subsublist' ).not( jObj ).slideUp( "slow" );
    jObj.slideToggle( 800 );
});