jQuery: change a css value if a option is selected
- by Ivan Castellanos
I'm trying to make an option dropdown menu and I got stuck when I try to show a textbox if the option 'other' is selected.
there's what I have:
<span id="con-country"><label for="country">Country: </label>
<select name="country" required="required">
<option value="usa">United States</option>
<option value="uk">United Kingdom</option>
<option id="other" value="other">Other</option>
</select>
</span>
<span id="con-specify">
<label for="specify">Specify: </label>
<input type="text" name="specify" id="c-specify" required="required"></input>
</span>
CSS:
#con-specify{
margin-left: 50px;
display: none;
}
Simple huh?, the problem is that I don't know how to do the code in jQuery
So, if the user select other in the menu, then the textbox should appear, how can I do that?