I used jquery autocompletion for a while without any problems so far. I want to create a tag system (for example, one from stackoverflow).
For this, I use two plugins:
- JQuery UI (http://jqueryui.com/demos/autocomplete/)
- Xoxco (http://xoxco.com/projects/code/tagsinput/)
It works for me and works using this code:
$('#related_tags').tagsInput({
autocomplete_url : 'live_search.php',
autocomplete : {
minLength: 3,
delay: 150,
},
'height':'30px',
'width':'auto',
'removeWithBackspace' : true,
'minChars' : 3,
'maxChars' : 200,
'placeholderColor' : '#666666'
});
However, I need to change the way the data is displayed in real time (so that it displays more than just a shortcut). If you don't use these two plugins together (let's say you just use autocomplete), it's simple, you just do something like this:
$( "#related_tags" ).autocomplete({
source: 'live_search.php',
minLength: 3,
delay: 150
})
.data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( "<a href='item.php'>" + item.label + " " + item.surname + "<span style='color:#003399;'>" + item.p_name + "</span></a>" )
.appendTo(ul);
};
As you can see, I do not show only the label of the element, I also show the last name and first name p_.
So my question is:
?
, , . ?
P.S: , , , xoxco, , . !