【发布时间】:2014-04-06 00:01:38
【问题描述】:
我对 bootstrap popover 有问题,我一直对此感到困惑,即使在我阅读了一些关于 stackoverflow 的帖子之后也是如此。这是我的完整代码,弹出框不起作用。我不知道为什么。有人可以帮助我吗?
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/js/bootstrap- popover.js"></script>
<script src="http://w3resource.com/twitter-bootstrap/twitter-bootstrap-v2/js/bootstrap-tooltip.js"></script>
<script>
$(document).ready(function() {
$('.moreoption').popover({
placement : 'top', // top, bottom, left or right
title : 'This is my Title',
html: 'true',
content : 'hi'
});
});
</script>
</head>
<body>
<a href="#" title="" class="moreoption" style="color:black;font-size:13">more</a>
</body>
</html>
我想再问一个问题是,当我们要在bootstrap中使用popover,tooltips功能时,我们是否需要将文件“bootstrap-tooltips.js”和“bootstrap-popover.js”作为我们的js来源?或者我们只需要包含“bootstrap.min.js”?
真的很感激。
【问题讨论】:
标签: javascript twitter-bootstrap popover