Md. Salahuddin
Md. Salahuddin

Reputation: 1072

Twitter bootstrap dropdown toggle

My dropdown is working fine but the problem is I need Twitter anchor text clickable and redirect to desired url but it does not work.

So, then I will only allow caret to toggle the dropdown menu.

I've checked Here

But it's not working, how can I solve this?

Here is my code:

<div class="btn-group">
 <button type="button" class="btn btn-default btn-lg dropdown-toggle"   
  data-toggle="dropdown">
     <a href="http://twitter.com">twitter</a>
         <span class="adjust-caret">&nbsp;</span>
         <span class="caret"></span>
  </button>

  <ul class="dropdown-menu" role="menu">
   <li><a href="http://linkedin.com">linkedin</a></li>
   <li><a href="http://google.com">google</a></li>
   <li><a href="http://yahoo.com">yahoo</a></li>
   </ul>
 </div>

Upvotes: 0

Views: 154

Answers (1)

Rob Quincey
Rob Quincey

Reputation: 2896

Have you tried using Split Buttons?

<!-- Split button -->
<div class="btn-group">
  <a href="https://twitter.com" class="btn btn-default">Twitter</a>
  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu" role="menu">
   <li><a href="http://linkedin.com">linkedin</a></li>
   <li><a href="http://google.com">google</a></li>
   <li><a href="http://yahoo.com">yahoo</a></li>
  </ul>
</div>

It's not quite the same as a dropdown but I think it has the desired effect.

Upvotes: 2

Related Questions