mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Refactoring axo element handling
This commit is contained in:
parent
795c1fdcd6
commit
a9d2f97a80
7 changed files with 109 additions and 77 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue