Refactoring axo element handling

This commit is contained in:
Pedro Silva 2024-03-12 09:23:42 +00:00
parent 795c1fdcd6
commit a9d2f97a80
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
7 changed files with 109 additions and 77 deletions

View file

@ -8,6 +8,7 @@ class DomElement {
this.selector = this.config.selector;
this.id = this.config.id || null;
this.className = this.config.className || null;
this.attributes = this.config.attributes || null;
this.anchorSelector = this.config.anchorSelector || null;
}
@ -19,12 +20,12 @@ class DomElement {
this.$(document).on(action, this.selector, callable);
}
hide(important = false) {
setVisible(this.selector, false, important);
hide() {
this.$(this.selector).hide();
}
show() {
setVisible(this.selector, true);
this.$(this.selector).show();
}
click() {