bootstrap-ajax-typeahead icon indicating copy to clipboard operation
bootstrap-ajax-typeahead copied to clipboard

onSelectAjaxData css selector fix

Open ignaciomdominguez opened this issue 8 years ago • 0 comments

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

ignaciomdominguez avatar Jul 24 '17 14:07 ignaciomdominguez