I am wondering how to make the matched part of the autocomplete suggestions bold when using jquery ui autocomplete?
So for example if you type in \"ja\" and the sugg
In jQuery UI 1.11.1, here is the code I used to make it work (case insensitive):
open: function (e, ui) {
var acData = $(this).data('ui-autocomplete');
acData
.menu
.element
.find('li')
.each(function () {
var me = $(this);
var keywords = acData.term.split(' ').join('|');
me.text(me.text().replace(new RegExp("(" + keywords + ")", "gi"), '$1'));
});
}