danny danny - 1 year ago 86
CSS Question

Toggle drop down by clicking caret in bootstrap

Is it possible to have the drop down top link to another web page and then toggle the drop down by clicking the caret next to the drop down text?

<li class="dropdown">
<a class="disabled" href="http://google.com">
Dropdown <b class="caret dropdown-toggle" data-toggle="dropdown"></b>

<ul class="dropdown-menu">
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>

Is it possible for one to call the data-toggle="dropdown" function from tag?

Answer Source

I think you just want to move the caret outside of the google linked anchor:

  <a class="disabled" href="http://google.com">Dropdown</a>
  <a class="dropdown-toggle" data-toggle="dropdown"><b class="caret"></b></a>

See fiddle: http://jsfiddle.net/xwetvL3y/2/

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