Je veux que si on clique sur show1, on devait afficher Message Numero 1, et si on clique sur show2, on devait affiche Message Numero 2
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type='text/css'>
body {
margin-top: 0px;
}
.container {
width: 400px;
margin-right: auto;
margin-left: auto;
max-width: 700px;
max-height: 70px;
list-style:none;
background-color: red;
text-align:center;
position: relative;
}
.nav{
margin-top: 0px;
}
.nav li{
display:inline;
}
.closeIt {
float: left;
width: 400px;
margin-left: -40px;
text-align: left;
background-color: red;
font-size: 10px;
}
</style>
<script type="text/javascript" src="JS/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.container').hide();
$('.closeIt').click(function() {
$('.container').slideUp(2000);
});
$('.showIt').click(function() {
var getID = $(this).attr('id');
console.log(getID);
$('.container').children('#'+getID).slideDown(1000);
});
}); // end DOM
</script>
</head>
<body>
<div class="container">
<ul class="nav">
<li class="show1">Message Numero 1</li>
<li class="show2">Message Numero 2</li>
<span class="closeIt">[ Close ]</span>
</ul>
</div>
<div class="showit" id="show1">show1</div>
<div class="showit" id="show2">show2</div>
</body>
merci a vous