mirror of
https://github.com/itflow-org/itflow
synced 2026-09-21 14:11:17 +00:00
Migrate fully away from Jquery Stage 1
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
$(document).ready(function () {
|
||||
$('.modal').each(function () {
|
||||
const modalId = `#${$(this).attr('id')}`;
|
||||
if (window.location.href.indexOf(modalId) !== -1) {
|
||||
bootstrap.Modal.getOrCreateInstance($(modalId)[0]).show();
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.querySelectorAll('.modal').forEach(function (modal) {
|
||||
if (modal.id && window.location.href.indexOf('#' + modal.id) !== -1) {
|
||||
bootstrap.Modal.getOrCreateInstance(modal).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user