[development] problem using jquery for menus

Pooya pooya.source at gmail.com
Sun Jun 5 02:40:08 UTC 2011

Ok I'm trying to use a simple jquery plugin for my menu, it's like accordion
for menus but simpler. When you click on and parent item, submenus expand

this is how firebug inspects menus(it's just 2 menus here with 1 submenu):

- <div class="content">
- <ul class="menu">
*- <li class="expanded first active-trail">*
+ <a class="active" title="" href="/rouzdarou/">
- <ul class="menu" style="display: block;">
*- <li class="leaf first last">*
+ <a class="active" title="" href="/rouzdarou/">
*+ <li class="leaf last">*

and here's my jquery:

  $("div.content ul.menu li.expanded a").click(function()
$(this).next("div.content ul.menu li.expanded
ul.menu").slideToggle(300).siblings("div.content ul.menu li.expanded

I already have jquery and update ,... installed. This is such a simple code
I can't even make it work in drupal. I've used it in page.tpl.php, also
tried to include it in .info file.

Any1 can help me out here with drupal. Thanks in advance :)
Pooya Sanooei
Twitter <http://twitter.com/sourcesoft> -
Website <http://www.javabgoo.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110605/a4c97654/attachment-0001.html 

More information about the development mailing list