我在bootstrap 3.0中发现了一个问题,即当菜单折叠时导航菜单不工作。要查看示例,请转到此处:http://apexenergetics.azurewebsites.net/
我开始觉得可能是我的Javascript文件丢失了。我在iPhone5和iPad上测试了这个网站。在浏览器中浏览时,它运行正常。
更新:它似乎在Windows Phone上工作得很好。而且,只有带有下拉菜单的项目才不起作用。没有下拉菜单的链接/按钮才起作用。
<header>
<div class="row">
<div class="col-xs-12 col-md-6">
<img src="@Href("~/img/logo.png")" alt="Apex Energetics">
</div>
<div class="col-xs-12 col-md-6">
@*<form class="form-search">
<input type="text" class="input-medium search-query" placeholder="Search Apex Energetics">
<button type="submit" class="search-btn" >Search</button>
</form>*@
</div>
</div>
<!-- Static navbar -->
<div class="navbar">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="@Href("~/index")">Home</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Apex Complexes <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-toggle">
<a href="@Href("~/products/K-Line_Formulas")">K-Line Formulas</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/K-plex")"> »K-Line Nutritionals</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/K-Line_Creams")"> »K-Line Creams</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/K-Line_Homeopathics")"> »K-Line Homeopathics</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/Z-plex")">TerrainZyme® Formulas</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/L-plex")">Cellegion Formula®</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Homeopathics <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-toggle">
<a href="@Href("~/products/antitox")">Antitox®</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/A-plex")"> -B-Plex</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/B-plex")"> -B-Plex</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/C-plex")"> -C-Plex</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/D-plex")"> -D-Plex</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/E-plex")"> -E-Plex</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/N-plex")"> -N-Plex</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/W-plex")"> -W-Plex</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/S-plex")">Allertox</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/R-plex")">RegenRx</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/G-plex")">Metaboplex</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/M-plex")">Endotox</a>
</li>
<li class="dropdown-toggle">
<a href="@Href("~/products/flowers")">Flower Combinations</a>
</li>
</ul>
</li>
<li><a href="@Href("~/products/purvela")">Purvela™</a></li>
<li><a href="@Href("~/pages/contact")">Contact Us</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</header>
1条答案
按热度按时间rxztt3cl1#
对我有用。有一个问题,Bootstrap 3的下拉菜单有时在触摸屏上不起作用。如果这是你的问题,你可以像这样瞄准你的折叠下拉按钮...
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {}
...并为移动的上的下拉菜单添加单独的功能。