I am trying to create a form which when the select element \'parcel\' is selected it will show a div but when it is not selected I would like to hide the div. Here is my mar
Try:
if($("option[value='parcel']").is(":checked")) $('#row_dim').show();
Or even:
$(function() { $('#type').change(function(){ $('#row_dim')[ ($("option[value='parcel']").is(":checked"))? "show" : "hide" ](); }); });
JSFiddle: http://jsfiddle.net/3w5kD/