引导工具提示不起作用 [英] bootstrap tooltip is not working

查看:93
本文介绍了引导工具提示不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中使用引导程序.我正在尝试使用 data-html ="true" 将目录显示为工具提示.但它不起作用.

I'm using bootstrap in my application. I'm trying to show a table of contents as tooltip using data-html="true". but its not working.

这是我的代码:

    <div title="<table><tr><td>Column1</td><td>Value1></td><tr><td>Column2</td><td>Value</td></tr></table>" 
       data-html="true" rel="tooltip" style="cursor:pointer;" 
       class="infobox infobox-red  infobox-dark  " onclick="OpenDetails(this)">
      <div class="infobox-icon"><i class="logo-box boa"></i></div>
      <div class="infobox-data"><span class="infobox-data smaller">BOA</span>
      <div class="infobox-content">(0/0/0/0 )</div>
      </div>
    </div>

    $(function () {
            $("[rel='tooltip']").tooltip();
        });    

    function OpenDetails(Obj){
     }

在此先感谢大家的答复.

Thank you all in advance for your response.

推荐答案

使用

data-original-title

HTML:

<div rel='tooltip' data-original-title='<h1>big tooltip</h1>'>Visible text</div>

JavaScript:

Javascript:

$("[rel=tooltip]").tooltip({html:true});

如果要使用所有引导程序功能,请仅使用以下文件:

Just use the following files if you are going to use all bootstrap functions:

-bootstrap.css
-bootstrap.js

这篇关于引导工具提示不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆