From dd3b9558bb4928222f6f54fd43b4c847c030e6bc Mon Sep 17 00:00:00 2001 From: Florijan Hamzic Date: Thu, 3 Sep 2015 14:49:26 +0200 Subject: [PATCH] added afterRender callback --- src/jquery.autocomplete.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jquery.autocomplete.js b/src/jquery.autocomplete.js index 26721863..84fdb6fc 100644 --- a/src/jquery.autocomplete.js +++ b/src/jquery.autocomplete.js @@ -643,6 +643,7 @@ container = $(that.suggestionsContainer), noSuggestionsContainer = $(that.noSuggestionsContainer), beforeRender = options.beforeRender, + afterRender = options.afterRender, html = '', category, formatGroup = function (suggestion, index) { @@ -683,6 +684,10 @@ that.fixPosition(); container.show(); + if ($.isFunction(afterRender)) { + afterRender.call(that.element, container); + } + // Select first value by default: if (options.autoSelectFirst) { that.selectedIndex = 0;