为什么Bootstrap工具提示不能与Bootstrap Toggle Plugin一起使用?

时间:2016-04-08 08:58:00

标签: jquery twitter-bootstrap

我有以下代码,当用户将鼠标悬停在复选框上时,会在复选框上显示工具提示

<input type="checkbox" data-toggle="toggle" rel="tooltip" data-placement="bottom" title="Automatic Refresh" />


<script type="text/javascript">

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

</script> 

但是当我从Bootstrap Toggle添加这些库插件以使复选框成为滑动开关时,工具提示会停止显示。

<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>

以下是我到目前为止的链接 - http://jsbin.com/mepotaliti/edit?html,output

关于如何解决这个问题的任何想法?

1 个答案:

答案 0 :(得分:4)

也许不是一个好的解决方案,但速度非常快:)

<div rel="tooltip" data-placement="bottom" title="Automatic Refresh" style="width: 100px"> <input type="checkbox" checked data-toggle="toggle" style="width: 100%" /> </div>

我已经尝试了它并且有效

相关问题