Pranav Raj
Pranav Raj

Reputation: 873

running sample typeahead in bootstrap

i just started using bootstrap and the following jsfiddle: https://jsfiddle.net/nt3qsjbx/ contains the sample code for typeahead. I am not sure which this is not working!!

$('#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"... ]});

Upvotes: 2

Views: 57

Answers (1)

MrHaze
MrHaze

Reputation: 4016

Have a look at Twitter Typeahead

It's quite easy to use and straight forward.

Here is a good example of how to use it: https://twitter.github.io/typeahead.js/examples/

Upvotes: 1

Related Questions