From 7e470d520fedb398ea4eafc4857731b67ae06f9b Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Fri, 11 Sep 2020 17:48:08 +0530 Subject: [PATCH] Added FLO data character counter --- index.html | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 4a4e6ae..4226bcb 100644 --- a/index.html +++ b/index.html @@ -193,6 +193,20 @@ transition: border 0.2s ease; } + textarea{ + margin-bottom: 2rem; + } + + #show_character_count{ + position: absolute; + bottom: 0; + right: 0; + font-size: 0.8rem; + margin: 0.4rem 0.8rem; + } + + + #overlay { opacity: 0; pointer-events: none; @@ -1969,10 +1983,11 @@
- +
1040/1040
@@ -2780,6 +2795,15 @@ function backToTop() { document.getElementById('transactions-container').scrollTop = 0; } + + let showCharacterCount = document.getElementById('show_character_count') + document.getElementById('flotextdata').addEventListener('input', function(){ + if(1040 - this.value.length){ + showCharacterCount.textContent = `${1040 - this.value.length}/1040` + } + else + showCharacterCount.textContent = `You can only add FLO data upto 1040 characters.` + })