gpt4 book ai didi

javascript - 将工具提示添加到进度条 Bootstrap

转载 作者:行者123 更新时间:2023-11-29 14:51:24 25 4
gpt4 key购买 nike

这是我的代码:http://jsfiddle.net/52VtD/7255/

<div class="progress">
<div class="progress-bar progress-bar-success" style="width: 10%" data-toggle="tooltip" data-placement="bottom">
<span class="sr-only">35% Complete (success)</span>
</div>
<div class="progress-bar progress-bar-warning progress-bar-striped" style="width: 50%" data-toggle="tooltip" data-placement="bottom">
<span class="sr-only">10% Complete (warning)</span>
</div>
<div class="progress-bar progress-bar-danger" style="width: 10%" data-toggle="tooltip" data-placement="bottom">
<span class="sr-only">10% Complete (danger)</span>
</div>
</div>

JavaScript:

$(document).ready(function() {

$('.progress').tooltip();

});

虽然它似乎不起作用,但工具提示没有显示。谁能解释我哪里出错了?

最佳答案

你可以试试这样的东西

$('.progress-bar[data-toggle="tooltip"]').tooltip({
animated: 'fade',
placement: 'bottom'
});

看看 FIDDLE

关于javascript - 将工具提示添加到进度条 Bootstrap ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25116059/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com