How to implement jQuery Accordion for a Menu? I'm looking to implement something like the Accordion Menu module, but unfortunately that module has issues with Menu Block and other modules... so what's the best way to implement the jQuery Accordion menu with primary and secondary links, from a theming perspective? Should be a simple question for a themer, but I haven't found any specific tutorials that can take me step by step. 

Using Drupal 7, Adaptive Theme.

update: thanks for all the responses. I'll look at all of the suggestions and provide another update :-)



Madam Adam's solution: not working correctly yet


  Only got it to work with this modification; added to js file


(function ($) {
//add drupal 7 code
Drupal.behaviors.myfunction = {
    attach: function(context, settings) {
//end drupal calls

//some jquery goodness here...
$( "#accordion" ).accordion( {
  header: "li",
  collapsible: true
} );

}}})
(jQuery);
You have to include the accordion library by adding this line to your theme's template.php:

drupal_add_library('system', 'ui.accordion');


Then you trigger the accordion by adding this to yout template.php or an external js-file:

$( "#menu-container" ).accordion( {
  header: "li",
  collapsible: true
} );