Nathan Riley
asked on
jQuery Help - On Change of Select show div
<select class="form-control" name="assetType" required="" style="padding:0;">
<option value="" disabled="">---</option>
<option value="1">TEXT</option>
<option value="2">VIDEO</option>
<option value="3">IMAGE</option>
<option value="4">BILLBOARD</option>
<option value="5">BANNER</option>
<option value="6">OTHER</option>
</select>
How can I look for a change event of the dropdown and show a div only if the "VIDEO" selection is selected?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
this should do the trick:
Rainer
this should do the trick:
$("select[name='assetType']").change(function() {
if ($(this).val() == 2) {
$("#YourdDIVid").show();
}
});
HTHRainer
Please ignore my double posting - Julians answer is the one you should choose (too late 4 me :-)
Open in new window