当前位置: 动力学知识库 > 问答 > 编程问答 >

jquery - Bootstrap tooltip not showing right when aligned to the right

问题描述:

This is the tooltip I have now and it works fine:

But what I do really need is to align it to the right. So, when I .pull-right it looks like this:

This is may html:

<div class="wrapper">Login

<span rel="tooltip"

data-toggle="tooltip"

data-trigger="hover"

data-placement="right"

data-html="true"

data-title="Aenean nibh neque, mattis id diam non, placerat imperdiet urna.">

<span class="glyphicon glyphicon-info-sign pull-right" aria-hidden="true"></span>

</span>

</div>

and this is the tooltip call: $('[rel="tooltip"]').tooltip();

Any help? Thanks.

网友答案:

Pull the wrapper, not the tooltip.

<div class="wrapper pull-right">Login
    <span rel="tooltip" 
    data-toggle="tooltip" 
    data-trigger="hover" 
    data-placement="right" 
    data-html="true"
    data-title="Aenean nibh neque, mattis id diam non, placerat imperdiet urna.">
    <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
    </span>
</div>
分享给朋友:
您可能感兴趣的文章:
随机阅读: