engelsystem/resources/assets/js/design.js

14 lines
338 B
JavaScript
Raw 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);
});
});