1.started removal of CDNs.\n 2. Improved modular structure for all parts of project including database.
This commit is contained in:
9
static/js/lib/events.js
Normal file
9
static/js/lib/events.js
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
function initialiseEventHandler(selectorElement, classInitialised, eventHandler) {
|
||||
document.querySelectorAll(selectorElement).forEach(function(element) {
|
||||
if (!element.classList.contains(classInitialised)) {
|
||||
element.classList.add(classInitialised);
|
||||
eventHandler(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user