I am using bootstrap 3.3 and trying to show ajax contents on a 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 submit the HTML, it no longer works. how
echo '<div class="popover"> <div class="arrow"></div> <h3 class="popover-title">test</h3> <div class="popover-content"> <p>fgds</p> </div> </div>';
This does not work. What is wrong here?
My HTML view file
<span data-container="body" data-toggle="popover" data-tour_id="88">[Tour # 48844]</span>
jquery ajax php twitter-bootstrap codeigniter
Rejoanul Alam Jul 15 '16 at 8:31 2016-07-15 08:31
source share