twitter bootstrap popover插件bug - this.isHTML不是一个函数

时间:2012-06-27 13:11:18

标签: javascript jquery twitter-bootstrap popover

我直接从他们的页面复制了这个例子:

http://jsfiddle.net/D2RLR/631/

...我收到以下错误:

this.isHTML is not a function
[Break On This Error]       
$tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)

有什么想法吗?

以下是我导入JS文件的顺序:

              
    <script type="text/javascript" language="javascript" src="../Scripts/jquery.validate.js"></script>
    <script type="text/javascript" language="javascript" src="../Scripts/lib/bootstrap-modal.js"></script>
    <script type="text/javascript" language="javascript" src="../Scripts/lib/bootstrap-typeahead.js"></script>
    <script type="text/javascript" language="javascript" src="../Scripts/lib/bootstrap-alert.js"></script>
    <script type="text/javascript" language="javascript" src="../Scripts/lib/bootstrap-tooltip.js"></script>
    <script type="text/javascript" language="javascript" src="../Scripts/lib/bootstrap-tab.js"></script>        
    <script type="text/javascript" language="javascript" src="../Scripts/lib/bootstrap-datepicker.js"></script>
    <script type="text/javascript" language="javascript" src="../Scripts/lib/bootstrap-popover.js"></script>
    <script type="text/javascript" language="javascript" src="../Scripts/lib/date.js"></script>  
    <script type="text/javascript" language="javascript" src="../Scripts/lib/knockout-2.1.0.js"></script> 
    <script type="text/javascript" language="javascript" src="../Scripts/lib/knockout.mapping.js"></script>    

2 个答案:

答案 0 :(得分:1)

bootstrap-tooltip.js之前加载bootstrap-popover.js,它会起作用:

http://jsfiddle.net/jyN9H/

多数民众赞成因为popover扩展了BOOTSTRAP-TOOLTIP.js。

答案 1 :(得分:1)

我遇到了同样的问题,并使用bootstrap-tooltip v 2.0.2而不是更新的v 2.0.4。升级到2.0.4就可以了。谢谢亚当。