加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

twitter-bootstrap – Twitter Bootstrap工具提示:是否有可能避

发布时间:2020-12-18 00:23:19 所属栏目:安全 来源:网络整理
导读:我注意到在使用Bootstrap的 Tooltip时,我仍然需要在javascript文件中手动包含此行以使其工作: $('[rel="tooltip"]').tooltip();? 但是,引用documentation: You can use all Bootstrap plugins purely through the markup API without writing a single lin
我注意到在使用Bootstrap的 Tooltip时,我仍然需要在javascript文件中手动包含此行以使其工作:
$('[rel="tooltip"]').tooltip();?

但是,引用documentation:

You can use all Bootstrap plugins purely through the markup API
without writing a single line of JavaScript. This is Bootstrap’s first
class API and should be your first consideration when using a plugin.

但这不是我所看到的:http://jsfiddle.net/ccmyx/1/(尝试删除Javascript部分).

我错过了什么吗?

解决方法

不,与所有其他JavaScript组件相反,Tooltip和Popover都不支持data-api.这在 documentation中提到:

For performance reasons,the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读