HTML doesn't work on loading popup when ajax content

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> 
0
jquery ajax php twitter-bootstrap codeigniter
Jul 15 '16 at 8:31
source share

No one has answered this question yet.

See similar questions:

79
Download Bootstrap bootable content using AJAX. Is it possible?

or similar:

547
How do you get focused content using Twitter Bootstrap?
311
Select2 does not work if it is built into boot modal
272
How to remove twitter twitter downloader by clicking on it?
253
HTML inside Twitter Bootstrap popover
79
Download Bootstrap bootable content using AJAX. Is it possible?
one
jQuery validation submitHandler does not work on $ .ajax form data
one
Bootstrap Data Attributes with Bootstrap Download Plugin
0
How to get item in bootstrap popover after ajax loading
0
Non-Contact AJAX HTML Content
0
How to use HTML data from ajax call



All Articles