Mr A Mr A - 11 months ago 57
Javascript Question

Using Jquery to hide/unhide the textbox if button is clicked

I have input button , what I want is if a user clicks on the button then textbox should appear.

Below is the code which is not working :

<input type="submit" value="Add Second Driver" id="driver" />
<input type="text" id="text" />

$("#driver").click(function() {



Also the textbox should not be visible initially


try this: