我有一个 jquery-tokeninput 用于在应用程序中选择成员。输入时的下拉菜单显示所有数据而不是过滤。有趣的是,它以粗体显示它应该过滤的内容。
JSON:
[{"name": "Bill Bailey", "id": 2}, {"name": "Will Pimblett", "id": 3}, {"name": "Frank Surname", "id": 4}, {"name": "Mary Smith", "id": 5}, {"name": "Will Pimblett", "id": 6}]
HTML:
<div class="token-input-container">
<form action="." method="GET">
<div class="input-append">
<input type="text" id="token-input" name="names"/>
<button type="submit" class="btn token-input-submit">Select</button>
<script type="text/javascript">
$(document).ready(function () {
$("#token-input").tokenInput("/members/api/tokeninput-data", {resultsLimit:2,theme:'facebook',hintText:'Type in part of a members name...'});
});
</script>
</div>
</form>
</div>
并为蓝色截图道歉,这是我能得到它的唯一原因