success: function(data) {
var re=new RegExp('^('+request.term+')(.*)','i');
response($.map(data.users, function(item) {
return {
label: item.first_name.replace( re, "<strong class='hit'>$1</strong>$2") + " " + item.last_name.replace( re, "<strong class='hit'>$1</strong>$2"),
value: item.first_name + " " + item.last_name,
company: item.co_name
}
}))
}
|