Bootstrap: Tooltip + Dropdown

Created on 25 Aug 2013  Â·  3Comments  Â·  Source: twbs/bootstrap

Hi,

I have a dropdown menu and I add tooltip on the link which open dropdown.

Once added tooltip, the dropdown dont work.

this is the code:

<li class="dropdown">
    <a href="#" data-toggle="dropdown" data-placement="bottom" data-toggle="tooltip" data-original-title="Text" rel="tooltip">
        Click
    </a>
    <div class="dropdown-menu">
        Dropdown menu
    </div>
</li>

Most helpful comment

Hi,

yes, I was able to fix it, so I remove my last post.

working in this way (for others):

<li class="dropdown">
     <a href="#" data-placement="bottom" title="Text" class="my-tooltip my-dropdown" data-toggle="dropdown">
         Click
     </a>
     <div class="dropdown-menu">
         Dropdown menu
     </div></li>

and on javascript:

$('.my-dropdown').dropdown();
$('.my-dropdown').tooltip();

All 3 comments

it's because the last "data-toggle" tag, overrides the first dada-toggle="dropdown", you cannot use duplicate tags.

your javascript declaration is duplicated

change for this:

$('.my-dropdown').dropdown();
$('.my-tooltip').tooltip();

see if it works fine.

2013/8/26 kamov [email protected]

Hi,

thanks!

so how to make it work?

I try in this way:

and on javascript:

$('.my-dropdown').dropdown();$('.my-dropdown').tooltip();

But still not working the dropdown.

—
Reply to this email directly or view it on GitHubhttps://github.com/twbs/bootstrap/issues/10143#issuecomment-23258974
.

Hi,

yes, I was able to fix it, so I remove my last post.

working in this way (for others):

<li class="dropdown">
     <a href="#" data-placement="bottom" title="Text" class="my-tooltip my-dropdown" data-toggle="dropdown">
         Click
     </a>
     <div class="dropdown-menu">
         Dropdown menu
     </div></li>

and on javascript:

$('.my-dropdown').dropdown();
$('.my-dropdown').tooltip();

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ziyi2 picture ziyi2  Â·  3Comments

devdelimited picture devdelimited  Â·  3Comments

iklementiev picture iklementiev  Â·  3Comments

andyyou picture andyyou  Â·  3Comments

bellwood picture bellwood  Â·  3Comments