问题标签 [bootstrap-typeahead]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
5 回答
16361 浏览

twitter-bootstrap - Bootstrap typeahead 在 Bootstrap 模式中不起作用

我正在使用 codeigniter 框架,我正在使用 bootstrap typeahead,一切都很好,但我的问题是当我将它放在 bootstrap 模式中时,bootstrap typeahead 将不起作用。有人能帮我吗?请。这是我的代码

在我的 add_task 控制器中,我调用了视图 task_view.php 和 task.js,但似乎预输入在引导模式中不起作用。

这是 task.js 的内容

这是 task_view.php 的内容:只是一个示例。

0 投票
7 回答
83002 浏览

angularjs - 在 Angular 中使用 Bootstrap 预输入

我目前正在开发一个 Web 应用程序,它使用 twitter-bootstrap 和 Angularjs 很好地协调。但是,我在使用预输入并将其用作 ng 模型时遇到了问题。

键入时一切正常,但是当我选择一个项目(建议)时,该值不会反映在 Angular 控制器中,除非我在选择一个值后更改文本框的值。类型 -> 选择 -> 类型有效。类型 -> 选择不起作用。

HTML:

角代码:

我添加了一个 ng-change 函数,只是为了检查模型值何时更改。它仅在手动键入时更改,而不是在从出现在 typeahead 的列表中选择一个值时更改。

我感谢任何可能有助于解决此问题的回复。谢谢!

0 投票
0 回答
278 浏览

html - Bootstrap typeahead - 中止选择处理程序

我正在使用bootstrap::typeahead通过单击他的标签来选择隐藏值

当用户单击其他地方以中止选择时,我想更新 selected_label (恢复以前的标签)。目的是告诉用户他没有选择任何东西。

onclose处理程序吗?
还是有其他方法可以做到这一点?

0 投票
0 回答
896 浏览

backbone.js - 带有 Twitter Bootstrap TypeAhead 的 Backbone.js

有一个匿名要点介绍了如何让 twitter bootstrap 的 typeahead 与backbone.js 一起工作。我将如何在实践中实现这一点?

0 投票
2 回答
3932 浏览

javascript - 带有预输入和分层项的 Javascript 组合框

我想创建一个带有分层项目列表的组合框。我需要能够单独选择父项和子项。我还需要能够为此组合框提供预输入功能。

例如,我想在 JS 中用这些数据制作一个组合框:

加拿大

——安大略

——魁北克

美国

——马萨诸塞州

——俄亥俄州

——德克萨斯

从这个下拉列表中,我希望能够单独选择任何一个省/州。我也希望能够选择“加拿大”而不选择它的孩子。

我已经尝试过 Select2 并且一直在挖掘 JQuery UI 以查看它是否可能,但到目前为止我还不能完全实现我需要的行为。我正在使用 bootstrap 编写此页面,但 boostrap 中给定的 typeahead 似乎根本不适用于组合框(我可以看到)。

0 投票
1 回答
1519 浏览

javascript - Bootstrap Typeahead 转义?

所以我使用 Bootstrap typeahead 插件来显示类列表。它适用于大多数课程,但如果您单击驾驶员教育的下拉菜单,输入字段中的文本将显示为“驾驶员教育”。

有没有办法解决这个问题?

0 投票
1 回答
271 浏览

twitter-bootstrap - Execute a function after the source of Twitter bootstrap typeahead is loaded

I'm actually using the plugin Typeahead from Twitter bootstrap and I would like to add a new row after the data from my server are loaded.

Once the data are loaded I would like to add a new row with the query at the end of the dropdown.

What is the trick to do that?

0 投票
1 回答
581 浏览

twitter-bootstrap - Twitter bootstrap typeahead 2.1.1 无法在源代码中设置功能

我正在尝试将源设置为预先输入的引导程序,但出现以下错误:

这是一个说明案例的 jsFiddle:http: //jsfiddle.net/NCEFR/1/

我在做什么不当?

注意插件的版本是2.1.1

0 投票
2 回答
1803 浏览

jquery - Grails 中的 Twitter Bootstrap 预输入示例?

我有一个文本字段,我正在尝试将其设置为Twitter Bootstrap 预输入,它调用控制器操作以返回用户查询的结果列表,我承认我有点不确定如何设置它. 有人可以举一个简单的例子来说明这种事情是如何在 Grails 中完成的吗?

谢谢!

0 投票
2 回答
1878 浏览

javascript - Twitter bootstrap - typeahead

i use Twitter Bootstrap and typeahead.

i download the plugin: Twitter Bootstrap Typeahead Plugin Extension

and so long so good, its working when i use a static javascript json array eg.

When i try to use ajax its will do enerything, my code look like this.

and its return this json array ( i can rebuild its on all ways, and i can't get it to work )

The plugin home pages. https://github.com/tcrosen/twitter-bootstrap-typeahead

i hobe enybardy can help me here :)

thanks a lot for all helping, :)

EDIT - Problem resovle! :) Just need to added header("content-type: application/json"); into my PHP file, hobe this answere are usefull for orther peopole! :)