在bootstrap中运行样本类型

时间:2015-07-29 22:28:20

标签: jquery twitter-bootstrap typeahead

我刚刚开始使用bootstrap和以下jsfiddle:https://jsfiddle.net/nt3qsjbx/包含typeahead的示例代码。 我不确定哪个不起作用!!

$('#country_v1-query').typeahead({
    order: "desc",
    source: {
        data: [
            "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda",
            "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh",
            "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia",
            "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burma",
            "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad",
            "Chile", "China", "Colombia", "Comoros", "Congo, Democratic Republic", "Congo, Republic of the"... ]});

1 个答案:

答案 0 :(得分:1)

查看Twitter Typeahead

这很容易使用和直接。

以下是如何使用它的一个很好的示例:https://twitter.github.io/typeahead.js/examples/