Question

How to hide and display text box using jquery? Suppose I have an email text box...

How to hide and display text box using jquery?

Suppose I have an email text box input. I want it to display a re-enter email text box when the user has entered a valid email address.

Can anyone give me direction as to how I can make that happen?

Homework Answers

Answer #1

In Jquery we have the hide() and show() functions to hide any particular control from the UI. using that we can hide and show the controls

Example:

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
// onclick of hide
$(".hide").click(function(){
// hiding the text box using hide()
$("#em").hide();
});
$(".show").click(function(){
// show will show the element
$("#em").show();
});
});
</script>
</head>
<body>

<input type="email" id="em"/>
<button class="hide">Hide</button>
<button class="show">Show</button>

</body>
</html>

Note : If you like my answer please rate and help me it is very Imp for me

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
hcs12 (assembly) lcd question. How can I make the text in the display that I enter...
hcs12 (assembly) lcd question. How can I make the text in the display that I enter into the keypad shift from left to right?
Posting this again because I was given a completely wrong answer but I appreciate anyone who...
Posting this again because I was given a completely wrong answer but I appreciate anyone who can try to help me with this. Unzip and open the Turner Solution\Turner Solution.sln file. Set the codeTextBox's MaxLength property to 1. The codeTextBox should accept only the numbers 1, 2, 3, and 4 and the Backspace key; code the appropriate event procedure. Code the displayButton_Click procedure to display the appropriate image in the displayPictureBox. The appropriate image is based on the code entered...
8- Develop a personal web page for yourself using HTML, CSS, and Javascript Use the following...
8- Develop a personal web page for yourself using HTML, CSS, and Javascript Use the following HTML tags to design your webpage <h1>…</h1> , <h3>… </h3> , <h6>… </h6> , <p>…</p> , <b> …</b> , <i>…</ i>, <a…..> </a>, <img…..> , <table>….</table> , <div> …</div>, <form>…</ form>, <input type=“text”>, and <input type=“submit”> Use an external css to change the default style of your webpage. You must use at least one element selector, one id selector, and one class selector Using...
How would I solve these python problems? A) File Display Download the file from here named...
How would I solve these python problems? A) File Display Download the file from here named numbers.txt . Write a program that displays all of the numbers in the file. numbers.txt contains 22 14 -99 AB B) Error Check Float Input When you want an int input you can check the input using the string isdigit() method. However, there is no comparable check for float. Write a program that asks the user to enter a float and uses a try-except...
I am looking for PYTHON code that will display the following: Code a menu-driven application that...
I am looking for PYTHON code that will display the following: Code a menu-driven application that does the following: The user can enter data for a product name, product code, and unit price. An example might be 'Breaburn Apples', 'BAP'. 1.99. After entering the data, it is appended (note I said 'appended') as a single line of text to a text file. Each line of text in the file should represent a single product. There is an option to display...
I am using Oracle HR. Write a query to display the last name of employees, length...
I am using Oracle HR. Write a query to display the last name of employees, length of the name, and first monday since the hire date. Make the query that the user is prompted to enter a letter that the last name start with by using a substitution variable for the letter. For example, if the user enters "H" or "h" when prompted, the output should show all employees whose start with letter H and make sure that the case...
Create a program that allows the user to input a list of first names into one...
Create a program that allows the user to input a list of first names into one array and last names into a parallel array. Input should be terminated when the user enters a sentinel character. The output should be a list of emial addresses where the address is of the following form: [email protected] Declare FirstName[100] as String Declare LastName[100] as String Declare email as String Declare K as Integer Declare index as Integer Write "Enter first and last name." Write...
Unzip and open the Turner Solution\Turner Solution.sln file. Set the codeTextBox's MaxLength property to 1. The...
Unzip and open the Turner Solution\Turner Solution.sln file. Set the codeTextBox's MaxLength property to 1. The codeTextBox should accept only the numbers 1, 2, 3, and 4 and the Backspace key; code the appropriate event procedure. Code the displayButton_Click procedure to display the appropriate image in the displayPictureBox. The appropriate image is based on the code entered by the user. Display the house1PictureBox's image when the code is 1, and so on. If the codeTextBox is empty, set the display...
USE C++!!!! Encryption and Decryption are two cryptographic techniques. Encryption is used to transform text to...
USE C++!!!! Encryption and Decryption are two cryptographic techniques. Encryption is used to transform text to meaningless characters, and decryption is used to transform meaningless characters into meaningful text. The algorithm that does the encryption is called a cipher. A simple encryption algorithm is Caesar cipher, which works as follows: replace each clear text letter by a letter chosen to be n places later in the alphabet. The number of places, n, is called the cipher key. For example, if...
PLEASE USING C# TO SOLVE THIS PROBLEM. THANK YOU SO MUCH! a. Create a project with...
PLEASE USING C# TO SOLVE THIS PROBLEM. THANK YOU SO MUCH! a. Create a project with a Program class and write the following two methods (headers provided) as described below: - A Method, public static int InputValue(int min, int max), to input an integer number that is between (inclusive) the range of a lower bound and an upper bound. The method should accept the lower bound and the upper bound as two parameters and allow users to re-enter the number...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT