0

Okay so I have a jQuery menu on this page here.

When you click on a parent (Bureau or Projecten) the child menue stays open at all the times even if you go: parent -> child -> child.

This does not work on: Bureau -> Publicaties -> "child" The menue closes.

I dont understand since I covered both "parent categories" (current-menu-item.parent and current-portfolio-ancestor) in the jQuery?

Any ideas?

$('.current-menu-item').parent('.sub-menu').css('visibility', 'visible');
$('.current-menu-item.parent, .current-portfolio-ancestor').find('.sub-menu').css('visibility', 'visible');

The whole jQuery code here

4

2 回答 2

0

用你的两行替换

$('.current-menu-parent').parent().css('visibility', 'visible');
于 2012-12-17T15:22:52.360 回答
0

http://wptemp.site90.net/portfolio/publicatie-test-b/,此行没有.current-menu-item您在以下代码中使用的任何 CSS 类(例如)script.js

<li id="menu-item-102" class="menu-item menu-item-type-post_type menu-item-object-page parent menu-item-102">

因此,可见性仍然是隐藏的。

于 2012-12-17T15:14:57.173 回答