How to write If condition in jquery.
Hello Friends,
I very new to jquery.
I am using show and hide div function in my web site.
There are number of DIV tags.
I just want to hide / show perticular div on links click event.
how should I achieve this.
My Jquery code is as follow -
<script type="text/javascript">
function showSlidingDiv() {
$("#DivWomenHostel").animate({ "height": "toggle" }, { duration: 1000 });
$("#DivGentsHostel").animate({ "height": "toggle" }, { duration: 1000 });
$("#DivGirlsHostel").animate({ "height": "toggle" }, { duration: 1000 });
}
</script>
Currently my all the DIV tags become hide and show after clicking on the any link.
Please, Tell me the solution for my problem.
--
Thanks.
Nilesh