Check if multiple select options contain a certain value

by Akram kamal

HTML

<select multiple id=machApp>
    <option>waffles</option>
    <option>pancakes</option>
    <option>other</option>
</select>
<div id=machAppSpec>
Yum
</div>

CSS

#machAppSpec{display:none}

JavaScript

$('#machApp').change(function() {
	var vals = $(this).val()    
    $("#machAppSpec").toggle(vals.indexOf("other")>0);
})