I am using Jquery UI autocomplete
widget with combobox
from here. it's working well but I need to filter the data when the value gets changed from the combo box i.e. from the widget.
I searched tried some code but it's not working
/* Snip */
select: function (event, ui) {
ui.item.option.selected = true;
if ('function' == typeof (callback = ui.item.option.parentElement.onchange))
callback.apply(this, []);
self._trigger("selected", event, {
item: ui.item.option
});
select.trigger("change");
},
/* Snip */
Please update me what I am doing wrong. The working example which I am using is available here.
I also get referenced from some link i.e. http://api.jqueryui.com/autocomplete/#event-change and http://www.learningjquery.com/2010/06/a-jquery-ui-combobox-under-the-hood but it's not working for me.