Reputation: 38432
I was using Jquery ui auto-complete with version 1.8.2 and later i shifted to 1.8.11. I started having problems.
1.8.2
1.8.11
$('#term').autocomplete({
minLength : 4,
source : rootPath+'/search',
select: function(event, ui)
{
window.location = ui.item.url;
}
});
Thanks
Upvotes: 3
Views: 1570
Reputation: 497
For you to render a custom HTML element in Auto Complete you need to use ._renderItem.
Once you render custom data then you can capture that using select method and process it the way you want.
Use following link to learn abour custom data formatting in jquery auto-complete
http://jqueryui.com/autocomplete/#custom-data
Upvotes: 2
Reputation: 4317
From http://jqueryui.com/demos/autocomplete/:
The label is always treated as text, if you want the label to be treated as html you can use Scott González' html extension.
And the aforementioned extension is located here: https://github.com/scottgonzalez/jquery-ui-extensions/blob/master/autocomplete/jquery.ui.autocomplete.html.js.
Upvotes: 1