theeggman85 theeggman85 - 1 year ago 62
HTML Question

Bootstrap - dropdown menu not working?

My dropdown menu in Bootstrap doesnt appear to be working - can anyone alert me to the problem? Right now it displays the dropdown, but clicking it does nothing. Thanks!


$(document).ready( function() {


<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container" style="width: auto;">

<a class="brand" style="text-indent: 3em" href="#">

<ul class="nav">
<li><a href="#">Profile</a></li>
<li class="active"><a href="#">Statistics</a></li>
<li><a href="#">Reader</a></li>

<li class="dropdown" id="menu1">
<a class="dropdown-toggle" data-toggle="dropdown" href="#menu1">
<b class="caret"></b>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>



Answer Source

Sorry that I could not comment on your post right away.

If I am getting you correctly, when you say that clicking does nothing, do you mean that it does not point to your URL?

In the anchor tag <a href>it looks like you did not pass your file path to the href attribute. So, replace the # with your actual path for the file that you want to link.

    <li><a href="#">Action</a></li>
                <li><a href="action link here">Another action</a></li>
                <li><a href="something else link here">Something else here</a></li>
                <li class="divider"></li>
                <li><a href="seperated link here">Separated link</a></li>

I hope this helps with your issue.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download