engelsystem/resources/assets/js/design.js

19 lines
492 B
JavaScript
Raw Permalink Normal View History

2023-12-06 21:10:00 +01:00
import { ready } from './ready';
ready(() => {
[...document.getElementsByClassName('prevent-default')].forEach((element) => {
let preventDefault = (e) => {
e.preventDefault();
return false;
};
element.addEventListener('submit', preventDefault);
element.addEventListener('click', preventDefault);
});
2024-01-29 10:54:41 +01:00
document.getElementById('delete-form')?.addEventListener('submit', (event) => {
event.preventDefault();
console.log('Delete confirmed');
});
2023-12-06 21:10:00 +01:00
});