相关疑难解决方法(0)

twitter bootstrap typeahead ajax示例

我试图找到一个twitter bootstrap typeahead元素的工作示例,该元素将进行ajax调用以填充它的下拉列表.

我有一个现有的工作jquery自动完成示例,它定义了ajax url以及如何处理回复

<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
    var options = { minChars:3, max:20 };
    $("#runnerquery").autocomplete('./index/runnerfilter/format/html',options).result(
            function(event, data, formatted)
                {
                    window.location = "./runner/index/id/"+data[1];
                }
            );
       ..
Run Code Online (Sandbox Code Playgroud)

我需要更改什么来将其转换为typeahead示例?

<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
    var options = { source:'/index/runnerfilter/format/html', items:5 };
    $("#runnerquery").typeahead(options).result(
            function(event, data, formatted)
                {
                    window.location = "./runner/index/id/"+data[1];
                }
            );
       ..
Run Code Online (Sandbox Code Playgroud)

我将等待" 添加远程源支持预先输入 "问题得到解决.

jquery jquery-autocomplete jquery-ui-autocomplete twitter-bootstrap typeahead.js

277
推荐指数
6
解决办法
30万
查看次数

Bootstrap 3 RC 1中的typeahead JavaScript模块在哪里?

如你所知,Bootstrap RC 1就在这里,我一直在阅读这个新框架中所有新的强大功能.但是猜猜是什么,typehead不在文档中.有谁知道这是出于任何原因吗?

我在google搜索时发现了这些例子,并且我在这篇文章中读到他们改变了类型头Bootstrap.所以我必须手动添加它还是在Bootstrap 3包中?

有谁知道这件事?

jquery twitter-bootstrap twitter-bootstrap-3

76
推荐指数
5
解决办法
8万
查看次数