Activating div for checkbox

I want to make a “others” checkbox and textarea that can be activated only when this checkbox is selected. I couldn’t use conditional statements. Anyone help pls

I think you might have create a textarea and initially hide it with CSS and use querySelectors and add an Event Listener on the checkbox so when it is clicked (or focused) the visibility or height of the textarea is changed. And to make the user experience fluid it would require a good amount of Javascript. This is just from the back of my head there might be ton of different methods that don’t require JS and only CSS.

I’ll look for more ways to achieve this in the meantime.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.