Bootstrap popover不在Chrome扩展程序中工作,尽管它在普通网页中有效。有没有东西可以延长弹出窗口?我也已尝试将数据切换更改为手动或焦点。它们都在我作为chrome://扩展的解包扩展加载的文件夹中,包括bootstrap,jquery和tether minified js文件。
popup.js:
$(document).ready(function(){
$('[data-toggle="popover"]').popover({
placement: 'left'});
});
popup.html:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="jquery.min.js"></script>
<script type="text/javascript" src = "tether.min.js"></script>
<script src="bootstrap.min.js"></script>
<script type="text/javascript" src="popup.js"></script>
</head>
<body>
<div class="container">
<h3>Popover Example</h3>
<a href="#" title="Dismissible popover" data-toggle="popover" data-trigger="manual" data-content="Hi">Click me</a>
</div>
</body>
</html>
的manifest.json:
{
"manifest_version": 2,
"name": "Popover",
"description": "Make a popover.",
"version": "1.0",
"browser_action": {
"default_popup": "popup.html"
}
}
谢谢!