From a UX point of view, I think (s) is perfectly acceptable. But anyway, how about this:
<option value='Servings' data-singular="Serving" data-plural="Servings">Servings</option>
then
// you should really use IDs ;) $('input[name="yield"]').on('change', function () { var singular = parseInt($(this).val(), 10) === 1; $('select[name="yieldType"]').each(function () { if (singular) { $(this).val($(this.attr('data-singular'))); } else { $(this).val($(this.attr('data-plural'))); } }); });
source share