Your selectors are messed up
$('#eventType').change(function() {
var eventTypeName = $("#eventType option:selected");
if (eventTypeName.is('[name="wedding"]') ) {
$('#band_type_choices option[name="acoustic"]').text('Wedding Ceremony');
}
});
The wedding option does not have a class wedding
, it has name attribute set as wedding
, also the :contains
is case sensitive so it will be better to use a name selector for setting the value
Demo: Fiddle