Select 2 is not working on a dynamic modal with loaded content dynamically with external content.
Below is the js code that calls the modal
function showAdd() {
$('#add_modal').modal('show');
$("body").addClass("modal-open");
var get_url = "{{ url($type.'/create') }}";
$("#add_modal_body").html('<div class="text-center">{!! HTML::image('assets/loader.gif') !!} Loading.....</div>');
$.ajax({
type: "GET",
url: get_url,
data: {}
}).done(function (response) {
$("#add_modal_body").html(response);
});
}
Where exactly do i call KTApp.init() ?
Thank you.<pre></pre>
It is working now, i just called KTApp.init(); on the js session.
Thank you
Great! All the best with your project