I have four links which i need to show hide there corresponding div depending on which one is clicked. Also if the same link is clicked it should hide its corresponding link. All fade fadIn.
Fiddle: http://jsfiddle.net/zangief007/mnotd7Lh/
<ul>
<li><a id="category" href="">Catergory</a></li>
<li><a id="style" href="">styles</a></li>
<li><a id="brand" href="">brand</a></li>
</ul>
<div id="one">This is my category</div>
<div id="two">This is styles</div>
<div id="three">This is main brands</div>
JS:
$("#category").click(function(){
$("#one").fadeToggle();
});
$("#style").click(function(){
$("#two").fadeToggle();
});
$("#style").click(function(){
$("#three").fadeToggle();
});
CSS:
#two, #three, #four{
display:none;
}