Vas*_*lis 5 jquery jquery-select2
我使用优秀的select2 jquery插件来选择标签.
我无法找到限制结果的方法(仅限前5).
我的代码:
var tags = []; // this array is filled with user's tags
$("#tags").select2({
minimumInputLength: 2,
placeholder: 'tags',
tags: tags,
tokenSeparators: [",", " "],
closeOnSelect: false
});
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?