Hover上的Twitter Bootstrap工具提示&焦点 [英] Twitter Bootstrap Tooltips on Hover & Focus

查看:82
本文介绍了Hover上的Twitter Bootstrap工具提示&焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Twitter引导程序工具提示触发器默认是悬停。

Twitter bootstrap tooltip trigger default is hover.

我可以添加data-trigger =focus以使工具提示显示在焦点上,但我如何同时执行悬停和焦点?

I can add data-trigger="focus" to cause the tooltip to display on focus, but how I do both hover and focus?

推荐答案

@Adrian解决方案无法在Bootstrap 3上运行。使用以下内容:

solution by @Adrian does not work on Bootstrap 3. Use following:

$('[rel=tooltip]').tooltip();
$(document).on('hover', '[rel=tooltip]', function () { $(this).tooltip('show'); });
$(document).on('focus', '[rel=tooltip]', function () { $(this).tooltip('show'); });

这篇关于Hover上的Twitter Bootstrap工具提示&焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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