Can I use dynamic content in a Bootstrap popover?

前端 未结 5 1056
独厮守ぢ
独厮守ぢ 2020-12-29 07:44

I am using a Bootstrap Popover in a \'Repeat Region\' which displays Testimonials. Each testimonials has a \'View Property Details\' button which opens up the popover. In th

5条回答
  •  孤独总比滥情好
    2020-12-29 08:09

    $("selector").popover({
            trigger : "manual",
            placement : 'right',
            html : true,
            template : '

    ' }).popover("show"); $.ajax({ async : true, url : url, dataType : 'json', success : function(d) { $("#phover" + id).attr('data-original-title', d['heading']); $('.popover-title').html(d['heading']); $('.popover-content').html(d['body']); }, beforeSend : function() { var loadingimage = '
    '; $('.popover-title').html(loadingimage); $('.popover-content').html(loadingimage); } });

提交回复
热议问题