style an upload button for phones/tablets

This commit is contained in:
ellotheth
2023-08-17 21:02:28 +02:00
committed by Gunwant Jain
parent 3bbd64611f
commit fc821be03f
3 changed files with 25 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
const body = document.querySelector('body');
const form = document.querySelector('form');
const grid_form = document.querySelector('.grid_form');
const fileInput = document.querySelector('.fileUpload');
const upload_card = document.querySelector('#upload_card');
const textarea = document.querySelector('textarea');
const select = document.querySelector('select');
@@ -18,6 +19,7 @@ window.onload = () => {
const onInput = () => {
submitButton.classList.toggle('hidden', !textarea.value);
select.classList.toggle('hidden', !textarea.value);
fileInput.classList.toggle('hidden', textarea.value);
}
textarea.addEventListener('input', onInput);
onInput();