Effet slideUp et slideDown
Bonjour,
Je voudrai masquer temporairement une Div. J'ai fait ce code mais ça marche pas.
https://jsfiddle.net/v759qzxn/2/ (Je veux masquer la Div verte).
Auriez-vous une explication à me donner svp.
Merci à vous.
Arsène
Code HTML :
Code:
1 2 3 4 5 6
| <input id="Masque" type="button" onClick="$();" value="Masquer" />
<div id="Global">
<div id="Conteneur">
<div id="div1"></div>
</div>
</div> |
CODE Jquery :
Code:
1 2 3
| $("#Masque").click(function () {
$('#div1').slideUp(10).delay(1000).slideDown(10);
}); |
Code CSS :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| #Global {
width:300px;
height:100px;
background-color: yellow;
}
#Conteneur {
position: absolute;
background-color: red;
width:200px;
height:100px;
}
#div1 {
width:200px;
height:40px;
background-color: green;
} |