I'm dealing with HTML code that looks like this:
<div id="answerTypeSection" style="visibility: hidden">
<div class="row">
<div class="col-md-2">adfadfafasdfasdfas</div>
</div>
<label class="control-label">adfa</label>
adfaf
</div>
<select id="answerType" class="form-control">
<option></option>
<option>Text</option>
<option>A or B (Boolean)</option>
<option>Numeric</option>
<option>Photo</option>
<option>Files</option>
<option>Multi (combo)</option>
</select>
Now, in my JavaScript...
$("#answerType").change(function () {
var answerType = $('#answerType').val();
console.log('in');
var showType;
switch(answerType) {
case "Numeric":
showType = "N";
console.log('numeric');
$("#answerTypeSection").show();
break;
default:
showType = "what";
// hide?
console.log('hide');
$("#answerTypeSection").hide();
break;
}
// required
});
The issue here is that 'in' and 'numeric' are logged in the console, but answerTypeSection
does not seem to show up. Shouldn't it be visible?