I came up with a unique idea for a search feature where clicking a "button" would reveal and expand the input box. Instead of using a hidden checkbox, I decided to experiment with using a label because clicking the label could focus on the connected element. While setting focus and basic transformations worked, I encountered difficulty in hiding/showing the textbox using CSS properties like visibility: hidden/visible
or display: none/inline-block
. Using just opacity wasn't sufficient since the textbox could still be interacted with even when not visible.
You can check out my current attempt here: JsFiddle
I'm struggling to understand why this approach isn't working as expected. Can anyone provide some insight into what I might be doing wrong?