From 7aa203150fc1a2ec79c681c13f0d486d531746eb Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Sun, 12 Mar 2023 23:57:48 +0200 Subject: error pages; js system to support back/front-end --- html/content/js/Forms/textarea.js | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 html/content/js/Forms/textarea.js (limited to 'html/content/js/Forms/textarea.js') diff --git a/html/content/js/Forms/textarea.js b/html/content/js/Forms/textarea.js deleted file mode 100644 index 493c78f..0000000 --- a/html/content/js/Forms/textarea.js +++ /dev/null @@ -1,26 +0,0 @@ -$$plugins.define('textarea', function (element, options) { - const textarea = element.querySelector('textarea'); - - //style focus - textarea.addEventListener('focus', (event) => { - textarea.closest(".textarea").classList.add("focus"); - }); - - textarea.addEventListener('blur', (event) => { - textarea.closest(".textarea").classList.remove("focus"); - }); - - //characters count - textarea.addEventListener("input", event => { - const target = event.currentTarget; - const maxLength = target.getAttribute("maxlength"); - const currentLength = target.value.length; - const currentLengthText = document.getElementsByClassName("textarea__remaining")[0]; - - currentLengthText.innerHTML = currentLength; - - if (currentLength >= maxLength) { - return; - } - }); -}); -- cgit v1.2.3