When rendering this template. The html is correct, and the html table loads correctly. But I have put special pop-over attributes to some cells. These do not work after loading the html TemplateView from a ajax request on the same page.

I have literally copied the exactly original template html for the html table and javascript, from the basehtml.html and put it into servicepathtable_html_table.html. Everything loads in the view including the Datatable. Search functionality and sorting work, but the popup and hover overs don't work. I know that the table html itself is being rendered correctly. As the correct field is highlighted green using a html attribute for that <td>

I'm thinking it has to do something with reloading the DOM or at least having the DOM recognize the new html. Any help on getting the popovers to "work" would be greatly appreciated.

Ajax Request:

$.ajax({ url: "/servicepathapi/v1/servicepathtable_html/", type: 'GET', dataType: 'html', success: function(result) { $('#s1').html(result); $.smallBox({ title : "Table Loaded Successfully", content : "The API Works", color : "#79C1E4", timeout: 10000, icon : "fa fa-thumbs-up", }); console.log(result) } });

basehtml.html:

<div class="tab-pane fade in active" id="s1"> </div>

views.py:

class Servicepathtable_html_table(TemplateView): template_name = "servicepathtable_html_table.html" def get_context_data(self, **kwargs): context = super(Servicepathtable_html_table, self).get_context_data(**kwargs) enddate = date.today() startdate = enddate - timedelta(days=4) service_path_recents = ServicePathTableFull.objects.filter(date__range=[startdate, enddate]) recent_service_names = [x.service_path_name for x in service_path_recents] service_path_created_recent = ServicePathTableFull.objects.filter(date_created__range=[startdate, enddate]) created_recent_service_names = [x.service_path_name for x in service_path_created_recent] for service in created_recent_service_names: if service in recent_service_names: recent_service_names.remove(service) context['service_path_table'] = ServicePathTableFull.objects.all() context['service_paths'] = ServicePathPaths.objects.all() context['recent_service_names'] = recent_service_names context['service_path_recents'] = service_path_recents context['created_recent_service_names'] = created_recent_service_names return context

servicepathtable_html_table.html: