2016-11-16 66 views
0

引导酥料饼不露面

$(document).ready(function(){ 
 
    $('[data-toggle="popover"]').popover(); 
 
});
.edit-list-element{ 
 
    position: absolute; 
 
    top: 4px; 
 
    left: 214px; 
 
    padding-top: 5px; 
 
    visibility: hidden; 
 
}
<a href="#" data-toggle="popover" title="List options" data-content="Some content inside popover"><span class="glyphicon list-glyphicon glyphicon-option-horizontal option-list-img"></span></a>

我看了很多类似的帖子在这里,但没有所提供的方式工作。

+1

有你加入你的CSS的'.edit一览element'一个特别的原因?我不知道它是否在你的标记。 – Crowes

+0

你包括哪些JS脚本?你有没有确保JQuery在引导之前先加载?或者您是否将脚本设置为异步?或者你在使用另一个与$对象冲突的库 –

回答

1

请确保您已包含所需的css和脚本来运行引导程序。 请检查下面的代码。

$(function() { 
 
    $('[data-toggle="popover"]').popover() 
 
})
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/> 
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
 

 
<a href="#" data-toggle="popover" title="List options" data-content="Some content inside popover"><span class="glyphicon list-glyphicon glyphicon-option-horizontal option-list-img"></span></a>

+0

所有这些库都包含在内-_- –