[themes] 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
horizontal.

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>
</ul>
</li>
*+ <li class="leaf last">*
</ul>
</div>



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
ul.menu").slideUp("slow");
});

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> -
Facebook<http://facebook.com/pooya.sanooei>-
Website <http://www.javabgoo.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/themes/attachments/20110605/a4c97654/attachment.html 


More information about the themes mailing list