I'm using EasyAutoComplete (http://easyautocomplete.com/), which while it does utilize jquery, is different from the standard jquery ui autocomplete. I'm trying to make it so that users can only select an item that is from the list that gets generated. I found the answer I wanted for the standard jquery ui autocomplete here: jQuery UI autocomplete: enforce selection from list without modifications
The issue is that I'm not quite sure how I can take that code and implement it along with EasyAutoComplete. Specifically, I would like to use this bit:
change: function (event, ui) {
if (ui.item == null || ui.item == undefined) {
$("#artist").val("");
$("#artist").attr("disabled", false);
} else {
$("#artist").attr("disabled", true);
}
}
While the documentation for EasyAutoComplete does provide several event handlers, none of them are for the event that I want. I'm guessing I would need to somehow work this into the jquery.easy-autocomplete.min.js code itself, but I am at a loss at where to even start with that!
What is the best way to approach this?