Re: Non-Unique Element IDs
Reply #6 –
I came up with a solution. It just deletes the innerHTML, once the modal is hidden. Seems to work fine.
In Custom JS I added:
$(document).ready(function() {
var open_page_modal = $(this).find('.open-page-modal');
var modal = open_page_modal.next('.modal');
modal.on('hidden.bs.modal',function(){
var modal_body = $(this).find('.modal-body').get(0);
modal_body.innerHTML="";
});
var main_page_modal = $(this).find('#main-page-modal');
main_page_modal.on('hidden.bs.modal',function(){
var modal_body = $(this).find('.modal-body').get(0);
modal_body.innerHTML="";
});
});