I am using bootstrap 3.3 & trying to show ajax content on popover. Here is my jquery code
$('.action_col span').popover({
html: true,
trigger: 'manual',
placement: 'left',
content: function () {
var div_id = 'tmp-id-' + $.now();
var tour_id = $.trim($(this).data('tour_id'));
$.ajax({
type: 'post',
url: site_url + 'controller/tour_details',
dataType: 'html',
data: {
t: tour_id
}
}).done(function (response) {
$('#' + div_id).html(response);
});
return '<div id="' + div_id + '">Loading...</div>';
}
});
tour_details
method
echo 'working';
This works fine but when I send any HTML it doesn't work anymore. Like
echo '<div class="popover"> <div class="arrow"></div> <h3 class="popover-title">test</h3> <div class="popover-content"> <p>fgds</p> </div> </div>';
This is not working. Whats wrong here?
My HTML view file
<span data-container="body" data-toggle="popover" data-tour_id="88">[Tour # 48844]</span>