I've looked all over for an example of this but can't figure it out.
$('.ac-items').on(flexClick, function () {
var $this = $(this);
var inputSelection = $this.parent().parent().find('input').val();
var currentField = $this.parent().parent().find('input');
var crewInputs = $('input[id^="crew-list-"]');
var crewChoices = new Array ();
for (i=0; i<crewInputs.length; i++) {
crewChoices.push(crewInputs[i].value);
}
for (a = 0; a < crewChoices.length; a++) {
if (inputSelection == crewChoices[a]) {
alert('try again');
}
}
});