mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Merge branch '2.0-wip' of github.com:twitter/bootstrap into 2.0-wip
Conflicts: docs/assets/css/bootstrap.css docs/download.html
This commit is contained in:
commit
ccd963e622
2
docs/assets/css/bootstrap.css
vendored
2
docs/assets/css/bootstrap.css
vendored
@ -6,7 +6,7 @@
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
||||
* Date: Fri Jan 27 13:19:35 PST 2012
|
||||
* Date: Fri Jan 27 13:20:51 PST 2012
|
||||
*/
|
||||
article,
|
||||
aside,
|
||||
|
@ -1323,7 +1323,7 @@ $('.myCarousel').carousel({
|
||||
<h2>Example</h2>
|
||||
<p>Start typing in the field below to show the typeahead results.</p>
|
||||
<div class="well">
|
||||
<input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-data='["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]'>
|
||||
<input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-source='["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]'>
|
||||
</div>
|
||||
<hr>
|
||||
<h2>Using bootstrap-typeahead.js</h2>
|
||||
@ -1340,6 +1340,12 @@ $('.myCarousel').carousel({
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>source</td>
|
||||
<td>array</td>
|
||||
<td>[ ]</td>
|
||||
<td>The data source to query against.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>items</td>
|
||||
<td>number</td>
|
||||
|
8
docs/templates/pages/javascript.mustache
vendored
8
docs/templates/pages/javascript.mustache
vendored
@ -1258,7 +1258,7 @@ $('.myCarousel').carousel({
|
||||
<h2>{{_i}}Example{{/i}}</h2>
|
||||
<p>{{_i}}Start typing in the field below to show the typeahead results.{{/i}}</p>
|
||||
<div class="well">
|
||||
<input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-data='["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]'>
|
||||
<input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-source='["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]'>
|
||||
</div>
|
||||
<hr>
|
||||
<h2>{{_i}}Using bootstrap-typeahead.js{{/i}}</h2>
|
||||
@ -1275,6 +1275,12 @@ $('.myCarousel').carousel({
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{_i}}source{{/i}}</td>
|
||||
<td>{{_i}}array{{/i}}</td>
|
||||
<td>[ ]</td>
|
||||
<td>{{_i}}The data source to query against.{{/i}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{_i}}items{{/i}}</td>
|
||||
<td>{{_i}}number{{/i}}</td>
|
||||
|
7
js/bootstrap-typeahead.js
vendored
7
js/bootstrap-typeahead.js
vendored
@ -25,7 +25,7 @@
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, $.fn.typeahead.defaults, options)
|
||||
this.$menu = $(this.options.menu).appendTo('body')
|
||||
this.data = this.options.data
|
||||
this.source = this.options.source
|
||||
this.shown = false
|
||||
this.listen()
|
||||
}
|
||||
@ -79,7 +79,7 @@
|
||||
|
||||
q = this.query.toLowerCase()
|
||||
|
||||
items = jQuery.grep(this.data, function (item) {
|
||||
items = jQuery.grep(this.source, function (item) {
|
||||
if (that.matcher(item, q)) return item
|
||||
})
|
||||
|
||||
@ -229,7 +229,8 @@
|
||||
}
|
||||
|
||||
$.fn.typeahead.defaults = {
|
||||
items: 8
|
||||
source: []
|
||||
, items: 8
|
||||
, menu: '<ul class="typeahead dropdown-menu"></ul>'
|
||||
, item: '<li><a href="#"></a></li>'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user