I'm trying to get the javascript working on my form to hide or show an input depending on the selection of a drop down..
HTML Code:
<label>
What Are You Looking To Finance :<select name="item" required="">
<option value="snowmobile">Snowmobile</option>
<option value="automobile">Car/Truck/Suv</option>
<option value="boat">Boat/Marine</option>
<option value="atv">ATV, Side by Side, Off-Road</option>
<option value="trailer">Recreationa/Trailer/RV</option>
<option value="computer">Electronic/TV/Computer</option>
<option value="other">Other</option>
</select>
</label>
<div id="itemother">
<label>
Please Describe Item :
<input type="text" name="itemother" placeholder="Enter Description and Value" />
</label>
</div>
I'm trying to target the selection name item and hide or show the itemother if selection = the 7th or (other)
Code:
$('select[name=item]').change(function(){
if ($('select[name=item]').val() == '7'){
$('#itemother').show();
}else{
$('#itemother').hide();
}
});
is what I was trying to use but it's not working - also have a css setup
HTML Code:
#itemother {
display: none;
}
<< This is not a sales pitch >>
<< This is not a sales pitch >>
Start your business with Webinar Webinar Jeo Bonus-
||Webinar Jeo Bonus
Antone Roundy
Want up to 57 bloggers to support your blog? Join a Team (free).
Keep your blog active faster and easier with "Blog Riffing":
* Free: PDF, High Impact Blog Riffing Course