i try to implement the accordion jquery for toggle slide down and slide up left navigation bar but i use the below jquery and the html code. But it not works it just show the “click here” only.
<script type="text/javascript">
jQuery("#accordion > li > div").click(function () {
if (false == $(this).next().is(':visible')) {
jQuery('#accordion ul').slideUp(300);
}
jQuery(this).next().slideToggle(300);
});
jQuery('#accordion ul:eq(0)').show();
</script>
here is my code in html:
<ul id="accordion">
<li>
<div>
Click here</div>
<ul>
<li><a href="#"</a>outer view</li>
<li><a href="#"</a>our works</li>
<li><a href="#"</a>Atrs</li>
<li><a href="#"</a>contac us</li>
<li><a href="#"</a>Demo</li>
</ul>
</li>
</ul>
</ul>
I hope you didn’t forget:
http://docs.jquery.com/