关闭Tooltip Bootstrap功能 [英] Turn the Tooltip Bootstrap functionality off

查看:431
本文介绍了关闭Tooltip Bootstrap功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据文档,可以关闭功能 $( 'body')。off('。alert.data-api')

如果是工具提示我在js console $('body')中尝试了以下操作.off('。tooltip.data-api')但它不会禁用Bottons上的工具提示。

任何提示如何在前面?

According the documentation is is possible to turn off the functionality just doing $('body').off('.alert.data-api').
In the case of tooltip I tried the following from js console $('body').off('.tooltip.data-api') but it does not disable the tooltip on bottons.
Any hints how to precede?

推荐答案

您不能以这种方式禁用工具提示,因为它在主体上没有事件侦听器。相反,您可以使用下面的代码自行禁用工具提示。

You can't disable tooltips that way because it has no event listener on the body. Instead, you can disable the tooltips themselves using the code below.

$('[rel=tooltip]').tooltip()          // Init tooltips
$('[rel=tooltip]').tooltip('disable') // Disable tooltips
$('[rel=tooltip]').tooltip('enable')  // (Re-)enable tooltips
$('[rel=tooltip]').tooltip('destroy') // Hide and destroy tooltips

这篇关于关闭Tooltip Bootstrap功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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