简体   繁体   English

Twitter Bootstrap 2.3.1弹出窗口不起作用

[英]Twitter bootstrap 2.3.1 popover doesn't working

I don't know what to do I have spend about 40 minutes for adding popover to image and without results, I have working popover on another project, I copied all from that project, but still doesn't working :( On older project I use 2.3.0 boostrap on this newer I use 2.3.1 and can't add popover :@ there is my code: 我不知道该怎么办,我花了大约40分钟的时间在图片中添加了弹出框,但没有结果,我在另一个项目上使用了弹出框,我从该项目中复制了所有图片,但是仍然不起作用:(在这个较新的版本上使用2.3.0 boostrap我使用2.3.1并且不能添加popover:@有我的代码:

<img id="img" src="http://has.lv/uploads/profile/photo-178.jpg" data-toggle="popover" data-content="Test" data-placement="top" data-original-title="Title" />

<script type="test/javascript">
$(document).ready(function(){
$('#img').popover({ trigger: "hover" });
});
</script>

and the fiddle: http://jsfiddle.net/Enw68/ 和小提琴: http : //jsfiddle.net/Enw68/

and yes I have added jquery and boostrap js files! 是的,我添加了jquery和boostrap js文件!

You're missing tooltip.js, a prerequisite for popover.js. 您缺少tooltip.js,这是popover.js的先决条件。

http://jsfiddle.net/Enw68/4/ http://jsfiddle.net/Enw68/4/

$(document).ready(function () {
    $('#img').popover({
        trigger: "hover"
    });
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM