开发者

Jquery autocomplete - how to massage the options before displaying?

I m using autocomplete from

http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

jQuery Autocomplete p开发者_开发知识库lugin 1.1

i managed to get data from server in below form with sepaerator to id as "-", but i dont want to show this id in list while selecting but sending it as hidden data.Please suggest.

Exon: Supplier HJR/VAKJ -1


try formatItem: function(){ ... }

$("...").autocomplete(data, {
 //.....
     formatItem: function(item) {
        return item.text.substr(0,item.text.lastIndexOf('-'));
     }
 //.....    
})

more on it here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜