$('#from').on('change', function () { var isAddress = this.value == 'address'; $('#infoaddress').toggle(isAddress); $('#infoaddress input').prop('disabled', !isAddress); });