Hey guys!
I made a "menu" and I want some content inside a div element to fadeIn if any of the menu numbers are clicked. And each number in the menu has a diffrent content.
It works fine if I click on the number 1 then nr1's content shows up, same with number 2. But lets say that I click on number 1, then on number 2, if now try to click on number 1 again nothing happens, nr1's content wont fadeIn again.
My code is:
$(document).ready(function(){
$(".one").click(function(){
$("#contText").fadeIn("slow");
});
$(".two").click(function(){
$("#contTextTwo").fadeIn("slow");
});
});
--------------------------- HTML
<div id="contText">
<p> test</p>
</div>
<div id="contTextTwo">
<p> test nummer 2</p>
</div>
------------------------- CSS
#contText {
position:absolute;
top:10px;
left:10px;
width:100px;
height:100px;
background-color: white;
display:none;
}
#contText p {
margin: 0;
}
#contTextTwo {
position:absolute;
top:10px;
left:10px;
width:100px;
height:100px;
background-color: red;
display:none;
}
#contTextTwo p {
margin: 0;
}
Thx for a great forum! // kiwo123