2

这让我很头疼,这是代码:

$(document).ready(function(){ 
    $(".tour-popover").popover({html: true });
    $('#1-popover').popover('show');
    $('.next-popover').click(function(){
        cur_num = parseInt($(this).attr('id'), 10); 
        $('#'cur_num+'-popover').popover('destroy');                    
    });
});

第一次使用该popover()方法显示,效果很好,但如果我想销毁或隐藏它,它不起作用并抛出此错误:Uncaught TypeError: Object [object Object] has no method 'popover'

这就是文件的调用方式:

<link rel="stylesheet" href="files/bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" href="files/bootstrap/css/bootstrap-responsive.css"/>

<link rel="stylesheet" href="files/custom-colors.css"/>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<link rel="stylesheet" href="files/main.css"/>
<script type="text/javascript" src="files/main.js"></script>    
<script type="text/javascript" src="files/bootstrap/js/bootstrap.js"></script>      
<script type="text/javascript" src="files/bootstrap/file-upload/bootstrap-fileupload.min.js"></script>
4

0 回答 0