我很难理解如何突出显示当前项目中的菜单项。我花了好几个小时寻找解决方案,最后总是被难住了。我的 jquery 不是很好。这是我的菜单。我怎样才能得到它,以便突出显示当前页面,同时也突出显示孩子的父级以及下拉菜单。一些代码还会同时突出显示多个页面。有人可以解释为什么吗?
<nav>
<ul class="nav">
<li class="dropdown">
<a href="index.php" class="dropdown-toggle disabled" data-toggle="dropdown"><i class="icon-home"></i>Home</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Marketing Tours<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="tour_management.php">Tour Management</a></li>
<li><a href="tour_management.php#leasing">Leasing</a></li>
<li><a href="index.php#case_studies">Case Studies</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> Specialty Vehicles <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="experiential_build.php">Experiential Builds</a></li>
<li><a href="mobile_cinema.php">Mobile Cinema (CineTransformer)</a></li>
<li><a href="mobile_broadcast.php">Mobile Broadcast/Production</a></li>
<li><a href="mobile_stage.php">Mobile Stage</a></li>
<li><a href="military&government.php">Military/Government</a></li>
<li><a href="#">Trailers</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> Creative<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Development</a></li>
</ul>
</li>
<li class="dropdown">
<a href="about.php" class="dropdown-toggle disabled" data-toggle="dropdown"> About </a>
</li>
<li class="dropdown">
<a href="contact.php" class="dropdown-toggle disabled" data-toggle="dropdown"><i class="icon-envelope-alt"></i> Contact </a>
</li>
</ul>
</nav>