Twitter bootstrap 引导popover自定义模板不起作用

Twitter bootstrap 引导popover自定义模板不起作用,twitter-bootstrap,twitter-bootstrap-3,bootstrap-popover,Twitter Bootstrap,Twitter Bootstrap 3,Bootstrap Popover,我正在尝试使用选项将自定义模板设置为popover,但从未添加该模板。为什么?这是代码。我需要这个方法才能工作,因为我不能使用这个方法。popover(ecc..) HTML: $('selectRecipientsBtn')。单击(函数(e){ e、 预防默认值(); 装载管理器(“”); }); 函数装入管理器(urlToLoad){var popoOverTemplate=''+ ''+ '';函数加载管理器(urlToLoad){ $(“#selectRecipientsBtn”)。按

我正在尝试使用选项将自定义模板设置为popover,但从未添加该模板。为什么?这是代码。我需要这个方法才能工作,因为我不能使用这个方法。popover(ecc..)

HTML:


$('selectRecipientsBtn')。单击(函数(e){
e、 预防默认值();
装载管理器(“”);
});
函数装入管理器(urlToLoad){var popoOverTemplate=''+
''+
'';函数加载管理器(urlToLoad){
$(“#selectRecipientsBtn”)。按钮(“加载”);
$.ajax({
键入:“GET”,
url:urlToLoad,
成功:功能(数据、状态、xhr){
$(“#selectRecipientsBtn”)。按钮(“重置”);
$(“#selectRecipientsBtn”).data(“bs.popover”).options.html=true;
$(“#selectRecipientsBtn”).data(“bs.popover”).options.title='ciao';
$(“#selectRecipientsBtn”).data(“bs.popover”).options.trigger='manual';
$(“#selectRecipientsBtn”).data(“bs.popover”).options.content=data;
$(“#selectRecipientsBtn”).data(“bs.popover”).options.template=popopoverTemplate;
$(“#selectRecipientsBtn”).popover(“show”);
},
错误:函数(xhr、状态、错误){
警报(“错误”);
},
});
}
您是否尝试过:

$("#selectRecipientsBtn").popover({
    title:'ciao',
    trigger:'manual',
    content:data,
    template:popoverTemplate
});
$("#selectRecipientsBtn").popover("show");
$('selectRecipientsBtn').popover({
是的,
标题:"经理",,
触发器:“手动”,
位置:'底部',
模板:popoverMessageTemplate
});
$('selectRecipientsBtn')。单击(函数(e){
e、 预防默认值();
$(“#selectRecipientsBtn”)。按钮(“加载”);
$.ajax({
键入:“GET”,
url:“”,
成功:功能(数据、状态、xhr){
$(“#selectRecipientsBtn”)。按钮(“重置”);
$(“#selectRecipientsBtn”).data(“bs.popover”).options.html=true;
$(“#selectRecipientsBtn”).data(“bs.popover”).options.content=data;
$(“#selectRecipientsBtn”).popover(“show”);
},
错误:函数(xhr、状态、错误){
警报(“错误”);
},
});
});
$("#selectRecipientsBtn").popover({
    title:'ciao',
    trigger:'manual',
    content:data,
    template:popoverTemplate
});
$("#selectRecipientsBtn").popover("show");
$('#selectRecipientsBtn').popover({
    html:true,
    title: 'managers',
    trigger : 'manual',
    placement : 'bottom',
    template: popoverMessageTemplate
});


$('#selectRecipientsBtn').click(function(e) {
    e.preventDefault(); 
    $("#selectRecipientsBtn").button('loading');

    $.ajax({
        type : 'GET',
        url : "<c:url value='/secure/send/managers' />",
        success : function(data, status, xhr) {
            $("#selectRecipientsBtn").button('reset');
            $("#selectRecipientsBtn").data("bs.popover").options.html=true;
            $("#selectRecipientsBtn").data("bs.popover").options.content=data;
            $("#selectRecipientsBtn").popover("show");          
        },
        error : function(xhr, status, error) {
            alert("error");
        },
    });
});