Migrate fully away from Jquery Stage 1

This commit is contained in:
johnnyq
2026-08-14 17:11:01 -04:00
parent dc6b191eed
commit 2354dd1511
9 changed files with 257 additions and 167 deletions

View File

@@ -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();
}
});
});
});