bootstrap-ajax-typeahead
bootstrap-ajax-typeahead copied to clipboard
onSelectAjaxData css selector fix
Hi, excelent plugin. I'm using jquery 3.x and bootstrap 3.3.7 and I found that when I use onSelectAjaxData event, invalid data is returned. I try to change css selector from this...
if (this.options.onSelectAjaxData) {
this.options.onSelectAjaxData({
data: this.ajax.data[ this.$menu.find(".active a").index() ]
});
}
... to this ...
if (this.options.onSelectAjaxData) {
this.options.onSelectAjaxData({
data: this.ajax.data[ this.$menu.find("li.active").index() ]
});
}
... and now is working fine. I hope this will be helpful and if not just discard it. Thanks Ignacio