Hi Guys,
If I Click on the current item it should toggle on and off and close all other item if it is open. When I click on menu1 it just keeps open.. i want to features like when it is open it should close, when it it closed it should open. Please see the url
http://207.210.64.138/~paglaso/jquery/toggle.php
<script language="javascript" type="text/javascript">
$(document).ready(function(){
$(".toggle_container").hide();
$("li.trigger").click(function(){
$(".toggle_container").hide();
$(this).next(".toggle_container").slideToggle("slow,");
$("li.trigger").removeClass("active");
$(this).addClass("active");
return false;
});
});
</script>
<ul>
<li class="trigger" id="t1">Menu 1</li>
<li class="toggle_container">Menu 1 content</li>
<li class="trigger" id="t2">Menu2</li>
<li class="toggle_container">Menu2 content</li>
<li class="trigger" id="t3">Menu3</li>
<li class="toggle_container">Menu3 content</li>
</ul>