jQuery or other libraries for contact forms

I am making a contact form and I just want to make an effect with a checkbox and an email input field.

The email input field is hidden foe default, but If the user previously checks the check box, the email input field will be shown.

I have jQuery scripts to get this, but are there any other scripts either in react, angular or other, in which I can get the same effect?

I’m concerned because I heard that jQuery is getting out of use little by little. Ok, you may tell me: “Use jQuery while it is still being used a lot…” I know, however, I’d like to know other options. Could you please, help me? Thanks for your patience.:hear_no_evil:

Neither. Use CSS! Much less overhead and doesn’t require any libraries.

<input type="checkbox" name="toggleInput">
<input type="text" name="myInput" value="blah blah blah">

input[name='toggleInput']:checked ~ input[name='myInput']{
     display: block;

     display: none;
1 Like

Thanks a lot!!! Actually, I know some CSS. I read about checked, disabled, enabled, classes but I didn’t know I can get this function with pure CSS. SO, what kind of classes are these? attribute? where can I learn more about these “dynamic classes”? Thanks once again. :clap:

When using them., ensure they’re supported by all browsers.