mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
add loaded event for modal load
This commit is contained in:
parent
0c1fb51db0
commit
092d5ca13c
@ -1,5 +1,8 @@
|
||||
$('.remote').on('show.bs.modal', function (e) {
|
||||
if (typeof e.relatedTarget !== "undefined") {
|
||||
$(this).find('.modal-content').load(e.relatedTarget.href);
|
||||
$(this).find('.modal-content').load(e.relatedTarget.href, function () {
|
||||
const event = new Event('custom.modal.loaded');
|
||||
$(this).closest('.modal').get(0).dispatchEvent(event);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user