Bootstrap Twitter Dropdown: Make the parent follow the link

Viewed 5076

I have this bootstrap twitter dropdown menu. I replaced the click event with hover event. Now the only problem is is supposed to follow www.google.com but it doesn't. I tried with:

 jQuery(".nav .dropdown-toggle").click(function () {
      return true;
    });

but no dice.

Here is the code:

<html>
  <head>
    <title>text</title>
    <link type="text/css" rel="stylesheet"  href="docs/assets/css/bootstrap.css"/>
    <link type="text/css" rel="stylesheet"  href="docs/assets/css/bootstrap-responsive.css"/>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript" src="js/bootstrap-dropdown.js"></script>
    <script type="text/javascript">
      $(function(){
        jQuery('.dropdown-toggle').dropdown();
        jQuery('ul.nav li.dropdown').hover(
        function() {jQuery(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn();},
        function() {jQuery(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut();}
      );

        jQuery(".nav .dropdown-toggle").click(function () {
          return true;
        });
      });
    </script>

  </head>
  <body>
    <ul class="nav nav-pills">
      <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="http://www.google.com">
          Dropdown
          <b class="caret"></b>
        </a>
        <ul class="dropdown-menu">
          <li><a href="#">text</a></li>
          <li><a href="#">text</a></li>
        </ul>
      </li>
    </ul>

  </body>
</html>

http://jsfiddle.net/rgdwM/

4 Answers
Related