Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
aa594501
Commit
aa594501
authored
Jan 26, 2012
by
Jacob Thornton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change typeahead to data-source instead of data-data and add to docs
parent
c63175dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
+19
-6
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+1
-1
docs/javascript.html
docs/javascript.html
+7
-1
docs/templates/pages/javascript.mustache
docs/templates/pages/javascript.mustache
+7
-1
js/bootstrap-typeahead.js
js/bootstrap-typeahead.js
+4
-3
No files found.
docs/assets/css/bootstrap.css
View file @
aa594501
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Thu Jan 26 2
2:39:03
PST 2012
* Date: Thu Jan 26 2
3:15:40
PST 2012
*/
*/
article
,
article
,
aside
,
aside
,
...
...
docs/javascript.html
View file @
aa594501
...
@@ -1323,7 +1323,7 @@ $('.myCarousel').carousel({
...
@@ -1323,7 +1323,7 @@ $('.myCarousel').carousel({
<h2>
Example
</h2>
<h2>
Example
</h2>
<p>
Start typing in the field below to show the typeahead results.
</p>
<p>
Start typing in the field below to show the typeahead results.
</p>
<div
class=
"well"
>
<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>
</div>
<hr>
<hr>
<h2>
Using bootstrap-typeahead.js
</h2>
<h2>
Using bootstrap-typeahead.js
</h2>
...
@@ -1340,6 +1340,12 @@ $('.myCarousel').carousel({
...
@@ -1340,6 +1340,12 @@ $('.myCarousel').carousel({
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr>
<td>
source
</td>
<td>
array
</td>
<td>
[ ]
</td>
<td>
The data source to query against.
</td>
</tr>
<tr>
<tr>
<td>
items
</td>
<td>
items
</td>
<td>
number
</td>
<td>
number
</td>
...
...
docs/templates/pages/javascript.mustache
View file @
aa594501
...
@@ -1258,7 +1258,7 @@ $('.myCarousel').carousel({
...
@@ -1258,7 +1258,7 @@ $('.myCarousel').carousel({
<h2>
{{
_i
}}
Example
{{/
i
}}
</h2>
<h2>
{{
_i
}}
Example
{{/
i
}}
</h2>
<p>
{{
_i
}}
Start typing in the field below to show the typeahead results.
{{/
i
}}
</p>
<p>
{{
_i
}}
Start typing in the field below to show the typeahead results.
{{/
i
}}
</p>
<div
class=
"well"
>
<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>
</div>
<hr>
<hr>
<h2>
{{
_i
}}
Using bootstrap-typeahead.js
{{/
i
}}
</h2>
<h2>
{{
_i
}}
Using bootstrap-typeahead.js
{{/
i
}}
</h2>
...
@@ -1275,6 +1275,12 @@ $('.myCarousel').carousel({
...
@@ -1275,6 +1275,12 @@ $('.myCarousel').carousel({
</tr>
</tr>
</thead>
</thead>
<tbody>
<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>
<tr>
<td>
{{
_i
}}
items
{{/
i
}}
</td>
<td>
{{
_i
}}
items
{{/
i
}}
</td>
<td>
{{
_i
}}
number
{{/
i
}}
</td>
<td>
{{
_i
}}
number
{{/
i
}}
</td>
...
...
js/bootstrap-typeahead.js
View file @
aa594501
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
this
.
$element
=
$
(
element
)
this
.
$element
=
$
(
element
)
this
.
options
=
$
.
extend
({},
$
.
fn
.
typeahead
.
defaults
,
options
)
this
.
options
=
$
.
extend
({},
$
.
fn
.
typeahead
.
defaults
,
options
)
this
.
$menu
=
$
(
this
.
options
.
menu
).
appendTo
(
'
body
'
)
this
.
$menu
=
$
(
this
.
options
.
menu
).
appendTo
(
'
body
'
)
this
.
data
=
this
.
options
.
data
this
.
source
=
this
.
options
.
source
this
.
shown
=
false
this
.
shown
=
false
this
.
listen
()
this
.
listen
()
}
}
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
q
=
this
.
query
.
toLowerCase
()
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
if
(
that
.
matcher
(
item
,
q
))
return
item
})
})
...
@@ -229,7 +229,8 @@
...
@@ -229,7 +229,8 @@
}
}
$
.
fn
.
typeahead
.
defaults
=
{
$
.
fn
.
typeahead
.
defaults
=
{
items
:
8
source
:
[]
,
items
:
8
,
menu
:
'
<ul class="typeahead dropdown-menu"></ul>
'
,
menu
:
'
<ul class="typeahead dropdown-menu"></ul>
'
,
item
:
'
<li><a href="#"></a></li>
'
,
item
:
'
<li><a href="#"></a></li>
'
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment