Sorry if this is extremely obvious, but I have looked and looked for a solution but haven\'t found anything. I\'m very new to jQuery, so even looking for what I want to do h
I've had to do this very thing. Here's the code I used:
$(function() {
var
jqDdl = $('#ddl'),
onChange = function(event) {
if ($(this).val() === 'Other') {
$('#otherTxtbox').show();
$('#otherTxtbox').focus().select();
} else {
$('#otherTxtbox').hide();
}
};
onChange.apply(jqDdl.get(0)); // To show/hide the Other textbox initially
jqDdl.change(onChange);
});