Questions tagged «popper.js»

18
悬停时如何保持Bootstrap弹出窗口的生命?
我正在使用Bootstrap弹出窗口来创建显示用户信息的悬停卡,并在将鼠标悬停在按钮上时触发它。我想在悬停弹出窗口时保持该弹出窗口的活动,但是一旦用户停止将鼠标悬停在按钮上,它就会消失。我怎样才能做到这一点? $('#example').popover({ html : true, trigger : 'manual', content : function() { return '<div class="box">Popover</div>'; } }); $(document).on('mouseover', '#example', function(){ $('#example').popover('show'); }); $(document).on('mouseleave', '#example', function(){ $('#example').popover('hide'); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js"></script> <script src="https://unpkg.com/@popperjs/core@2"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/> <a href="#" id="example" class="btn btn-danger" rel="popover" >hover for popover</a> 运行代码段隐藏结果展开摘要

6
引导程序4中的popper.js提供了SyntaxError意外的令牌导出
我尝试安装Bootstrap 4,并包含以下链接 <script src="libs/jquery/dist/jquery.min.js"></script> <script src="libs/tether/dist/js/tether.min.js" ></script> <script src="libs/popper.js/dist/popper.js"></script> <script src="libs/bootstrap/dist/js/bootstrap.min.js" ></script> 但是发生以下错误: 语法错误:意外的令牌导出 任何想法如何解决?

5
Bootstrap4依赖项PopperJs在Angular上引发错误
我刚刚创建了一个全新的 角度cli项目 并运行npm install bootstrap@4.0.0-beta jquery popper.js --save 和更改.angular-cli.json的相关部分,如下所示 "styles": [ "../node_modules/bootstrap/dist/css/bootstrap.css" ], "scripts": [ "../node_modules/jquery/dist/jquery.js", "../node_modules/popper.js/dist/popper.js", "../node_modules/bootstrap/dist/js/bootstrap.js" ], 但是收到以下错误 10:2287 Uncaught SyntaxError: Unexpected token export at eval (<anonymous>) at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9) at Object.../../../../script-loader/index.js!../../../../popper.js/dist/popper.js (popper.js?4b43:1) at __webpack_require__ (bootstrap 4403042439558687cdd6:54) at Object.2 (scripts.bundle.js:66) at __webpack_require__ (bootstrap 4403042439558687cdd6:54) at webpackJsonpCallback (bootstrap 4403042439558687cdd6:25) …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.