aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2015-01-01 12:01:55 -0800
committerMark Otto <[email protected]>2015-01-01 12:01:55 -0800
commit401ace65f4680e348faa049aa1cc326355f2dbd5 (patch)
treed51c48fb0c035cd811a07c2177ff9e8d6d057992 /docs
parent82403407d8c4999f5b256130bdd0a8f84e424413 (diff)
downloadbootstrap-401ace65f4680e348faa049aa1cc326355f2dbd5.tar.xz
bootstrap-401ace65f4680e348faa049aa1cc326355f2dbd5.zip
add indeterminate checkbox support
Diffstat (limited to 'docs')
-rw-r--r--docs/assets/js/src/application.js4
-rw-r--r--docs/components/custom-forms.md16
2 files changed, 19 insertions, 1 deletions
diff --git a/docs/assets/js/src/application.js b/docs/assets/js/src/application.js
index 8dfb82651..a349157a2 100644
--- a/docs/assets/js/src/application.js
+++ b/docs/assets/js/src/application.js
@@ -10,7 +10,6 @@
*/
/* global ZeroClipboard */
-/* global SimpleJekyllSearch */
!function ($) {
'use strict';
@@ -102,6 +101,9 @@
$(this).prev('.progress-striped').toggleClass('progress-animated')
})
+ // Custom indeterminate checkbox
+ $('.bs-example-indeterminate input').prop('indeterminate', true)
+
// Config ZeroClipboard
ZeroClipboard.config({
moviePath: '/assets/flash/ZeroClipboard.swf',
diff --git a/docs/components/custom-forms.md b/docs/components/custom-forms.md
index 97a469671..f42ce2759 100644
--- a/docs/components/custom-forms.md
+++ b/docs/components/custom-forms.md
@@ -29,6 +29,22 @@ In the checked states, we use **base64 embedded SVG icons** from [Open Iconic](h
</label>
{% endexample %}
+Custom checkboxes can also utilize the `:indeterminate` pseudo class.
+
+<div class="bs-example bs-example-indeterminate">
+ <label class="c-input c-checkbox">
+ <input type="checkbox">
+ <span class="c-indicator"></span>
+ Check this custom checkbox
+ </label>
+</div>
+
+**Heads up!** You'll need to set this state manually via JavaScript as there is no available HTML attribute for specifying it. If you're using jQuery, something like this should suffice:
+
+{% highlight js %}
+$('.your-checkbox').prop('indeterminate', true)
+{% endhighlight %}
+
### Radios
{% example html %}