So I did this
$('div#faq_search_result').replaceWith(decodeHtml(data.html_result));
It seems fine but the on click events is not working
this class won't work
dt class= "c-faqList__dt"
Code for the JS
var dfd = new $.Deferred();
var self = this;
self.$elm = elm;
self.$elm.on('click','.c-faqList__dt',function(event){
$(this).siblings('.c-faqList__dd').slideToggle(100)
});
dfd.resolve();
return dfd.promise();