Skip to content

Instantly share code, notes, and snippets.

View hudsonpereira's full-sized avatar
🕶️
Being awesome

Hudson Pereira hudsonpereira

🕶️
Being awesome
  • Brazil, São Paulo
View GitHub Profile
@hudsonpereira
hudsonpereira / refactoring-jquery.js
Last active March 22, 2023 08:59
Ideia to start refactoring jQuery based websites
function $(selector) {
this.element = document.querySelector(selector);
this.val = () => {
return this.element.value;
};
this.click = (handler) => {
return this.element.addEventListener("click", (event) =>
handler(event.target.value)