javascript - twitter bootstrap typeahead 是否支持远程数据源?

标签 javascript twitter-bootstrap

twitter-bootstrap 2.0.3版本是否支持typeahead功能支持远程数据源?

打字头功能的链接 http://twitter.github.com/bootstrap/javascript.html#typeahead

最佳答案

你试过吗:

$('.typeahead').typeahead({
    source: function (query, typeahead) {
        return $.post('/typeahead', { query: query }, function (data) {
            return typeahead.process(data);
        });
    }
});

关于javascript - twitter bootstrap typeahead 是否支持远程数据源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10680120/

相关文章:

html - 无法使用 bootstrap.css 更改导航栏的高度

css - 未通过 Bootstrap 的 sass 覆盖应用 body 覆盖

java - 如何在产品、LESS 或压缩 CSS 中使用 Twitter Bootstrap?

jquery - 使用 Bootstrap 3 淡入动态生成的内容

javascript - 在地理位置上显示 div

javascript - jquery css 颜色前后变化

javascript - 为什么我的下拉列表在除 IE11 之外的所有浏览器中都有效?

javascript - Vue 对数组进行排序,后跟索引 (0, 1, 2, 3 ...)

javascript - jQuery Mobile 转换根本不起作用

css - 将固定顶部元素放在另一个 bootstrap 4 之上