与jQuery插件Tokeninput问题 [英] Problems with the jquery plugin Tokeninput

查看:374
本文介绍了与jQuery插件Tokeninput问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用的jQuery插件Tokeninput,让TextBox中自动完成。我想prevent用户从选择重复的单词自动完成客栈的下拉。

I use the jquery plugin Tokeninput that allow autocomplete in textBox. I would prevent user from selecting duplicate words inn the dropdown of autocomplete.

没有任何人有任何建议来解决这个问题呢?

Does anybody have any suggestion to resolve this problem?

非常感谢在前进。

推荐答案

它看起来像有是preventDuplicates其中prevents用户通过此设置为true,在选择重复的值设置。默认值是假的,你想设置为true。

It looks like there is a setting for preventDuplicates which prevents user from selecting duplicate values by setting this to true. The default is false, you would want to set the to true.

    $(document).ready(function() {
        $("#demo-input").tokenInput("path/to/list", {
            preventDuplicates: true
        });
    });

您还可以看到演示在这里:的http://循环J .COM / jQuery的-tokeninput / demo.html#prevent-重复的。希望这有助于

You can also see the demo here: http://loopj.com/jquery-tokeninput/demo.html#prevent-duplicates. Hope this helps

这篇关于与jQuery插件Tokeninput问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆