jquery accordion submenu dropdown

I want to create accordion tabs .I reffered to this site . I get the following output:

Actually on click of Item 1 it should expand and display the sub menus..

but some how the onclick not working and in the navigation bar i get # appended to the url..

The below code is jquery function.

 $(document).ready(function () {
     $('#nav > li > a').click(function(){
     if ($(this).attr('class') != 'active'){
     $('#nav li ul').slideUp();
     $(this).next().slideToggle();
     $('#nav li a').removeClass('active');
     $(this).addClass('active');
  }
});

});

I have added the following scripts

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/development-bundle/jquery-1.4.2.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/development-bundle/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/development-bundle/ui/jquery.ui.accordion.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/development-bundle/ui/jquery.ui.tabs.js"></script>

Do I need to add more scripts to achive the same?

Answers


Can you check the below link accordion plugin

If you met any problem check jQuery conflict


Need Your Help

Array Partitioning

arrays algorithm dynamic-programming

I have a set of object numbered from 1 to n and there is only one instance of each object.Now say, I have received k request, each request is to get some set of object.

Functions, list and a square

python list

The idea of this procedure is to convert a "square" (list of lists) and turn it around.