将bootstrap弹出框的点击弹出改为鼠标移入弹出

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="bootstrap.min.css">
<script src="jquery.min.js"></script>
<script src="bootstrap.min.js"></script>
</head>
<body>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-trigger="hover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on 左侧
</button> <button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on 顶部
</button> <button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="Vivamus
sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on 底部
</button> <button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-trigger="hover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on 右侧
</button>
<p>在代码中加入data-trigger="hover"即可</p>
<script>
$(function ()
{ $("[data-toggle='popover']").popover();
});
</script>
</body>
</html>
上一篇:PHP弹出提示框并跳转到新页面即重定向到新页面


下一篇:浅析AnyCast网络技术