31 lines
651 B
JavaScript
31 lines
651 B
JavaScript
class publicE{
|
|
constructor(){
|
|
|
|
}
|
|
|
|
$(name){
|
|
return document.querySelector(name)
|
|
}
|
|
|
|
_(name){
|
|
return document.querySelectorAll(name)
|
|
}
|
|
|
|
customMethods(){
|
|
Element.prototype.add=function(name){
|
|
this.classList.add(name)
|
|
}
|
|
Element.prototype.remove=function(name){
|
|
this.classList.remove(name)
|
|
}
|
|
Element.prototype.none = function() {
|
|
this.style.display = "none"
|
|
}
|
|
Element.prototype.show = function() {
|
|
this.style.display = "block"
|
|
}
|
|
}
|
|
}
|
|
|
|
var {$, _ ,customMethods} =new publicE
|
|
customMethods() |