@@ -1420,23 +1435,31 @@ $('.carousel').carousel({
Typeahead bootstrap-typeahead.js
- About
- A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.
Example
- Start typing in the field below to show the typeahead results.
+ A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.
+
+<input type="text" data-provide="typeahead">
+
Usage
- Call the typeahead via javascript:
+
+ Via data attributes
+ Add data attributes to register an element with typeahead functionality as shown in the example above.
+
+ Via javascript
+ Call the typeahead manually with:
$('.typeahead').typeahead()
+
Options
+ Options can be passed via data attributes or javascript. For data attributes, append the option name to data-
, as in data-source=""
.
@@ -1480,11 +1503,6 @@ $('.carousel').carousel({
- Markup
- Add data attributes to register an element with typeahead functionality.
-
-<input type="text" data-provide="typeahead">
-
Methods
.typeahead(options)
Initializes an input with a typeahead.
diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache
index 825a40d926..e7c4a5bf06 100644
--- a/docs/templates/pages/javascript.mustache
+++ b/docs/templates/pages/javascript.mustache
@@ -186,6 +186,7 @@
$('#myModal').modal(options)
{{_i}}Options{{/i}}
+ {{_i}}Options can be passed via data attributes or javascript. For data attributes, append the option name to data-
, as in data-backdrop=""
.{{/i}}
@@ -402,6 +403,9 @@ $('#myModal').on('hidden', function () {
{{_i}}Call the dropdowns via javascript:{{/i}}
$('.dropdown-toggle').dropdown()
+ {{_i}}Options{{/i}}
+ {{_i}}None{{/i}}
+
{{_i}}Methods{{/i}}
$().dropdown()
{{_i}}A programatic api for activating menus for a given navbar or tabbed navigation.{{/i}}
@@ -485,6 +489,7 @@ $('[data-spy="scroll"]').each(function () {
{{_i}}Options{{/i}}
+ {{_i}}Options can be passed via data attributes or javascript. For data attributes, append the option name to data-
, as in data-offset=""
.{{/i}}
@@ -670,6 +675,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
$('#example').tooltip({{_i}}options{{/i}})
{{_i}}Options{{/i}}
+ {{_i}}Options can be passed via data attributes or javascript. For data attributes, append the option name to data-
, as in data-animation=""
.{{/i}}
@@ -781,6 +787,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
$('#example').popover({{_i}}options{{/i}})
{{_i}}Options{{/i}}
+ {{_i}}Options can be passed via data attributes or javascript. For data attributes, append the option name to data-
, as in data-animation=""
.{{/i}}
@@ -852,6 +859,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
{{_i}}Markup{{/i}}
{{_i}}For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.{{/i}}
+
{{_i}}Methods{{/i}}
$().popover({{_i}}options{{/i}})
{{_i}}Initializes popovers for an element collection.{{/i}}
@@ -917,6 +925,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
{{_i}}Closes an alert.{{/i}}
$(".alert").alert('close')
+
{{_i}}Events{{/i}}
{{_i}}Bootstrap's alert class exposes a few events for hooking into alert functionality.{{/i}}
@@ -1017,6 +1026,9 @@ $('#my-alert').bind('closed', function () {
</div>
+ {{_i}}Options{{/i}}
+ {{_i}}None{{/i}}
+
{{_i}}Methods{{/i}}
$().button('toggle')
{{_i}}Toggles push state. Gives the button the appearance that it has been activated.{{/i}}
@@ -1109,6 +1121,7 @@ $('#my-alert').bind('closed', function () {
$(".collapse").collapse()
{{_i}}Options{{/i}}
+ {{_i}}Options can be passed via data attributes or javascript. For data attributes, append the option name to data-
, as in data-parent=""
.{{/i}}
@@ -1253,7 +1266,9 @@ $('#myCollapsible').on('hidden', function () {
{{_i}}Usage{{/i}}
{{_i}}Call via javascript:{{/i}}
$('.carousel').carousel()
+
{{_i}}Options{{/i}}
+ {{_i}}Options can be passed via data attributes or javascript. For data attributes, append the option name to data-
, as in data-interval=""
.{{/i}}
@@ -1345,23 +1360,31 @@ $('.carousel').carousel({
{{_i}}Typeahead{{/i}} bootstrap-typeahead.js
- {{_i}}About{{/i}}
- {{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}
{{_i}}Example{{/i}}
- {{_i}}Start typing in the field below to show the typeahead results.{{/i}}
+ {{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}
{{! /example }}
+
+<input type="text" data-provide="typeahead">
+
{{_i}}Usage{{/i}}
- {{_i}}Call the typeahead via javascript:{{/i}}
+
+ {{_i}}Via data attributes{{/i}}
+ {{_i}}Add data attributes to register an element with typeahead functionality as shown in the example above.{{/i}}
+
+ {{_i}}Via javascript{{/i}}
+ {{_i}}Call the typeahead manually with:{{/i}}
$('.typeahead').typeahead()
+
{{_i}}Options{{/i}}
+ {{_i}}Options can be passed via data attributes or javascript. For data attributes, append the option name to data-
, as in data-source=""
.{{/i}}
@@ -1405,11 +1428,6 @@ $('.carousel').carousel({
- {{_i}}Markup{{/i}}
- {{_i}}Add data attributes to register an element with typeahead functionality.{{/i}}
-
-<input type="text" data-provide="typeahead">
-
{{_i}}Methods{{/i}}
.typeahead({{_i}}options{{/i}})
{{_i}}Initializes an input with a typeahead.{{/i}}