aboutsummaryrefslogtreecommitdiff
path: root/docs/assets/js/_src
diff options
context:
space:
mode:
Diffstat (limited to 'docs/assets/js/_src')
-rw-r--r--docs/assets/js/_src/application.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/assets/js/_src/application.js b/docs/assets/js/_src/application.js
index 08ca5f907..74556a3da 100644
--- a/docs/assets/js/_src/application.js
+++ b/docs/assets/js/_src/application.js
@@ -53,6 +53,23 @@
$('.bs-top').affix()
}, 100)
+ // theme toggler
+ ;(function () {
+ var stylesheetLink = $('#bs-theme-stylesheet')
+ var themeBtn = $('.bs-docs-theme-toggle')
+ themeBtn.click(function () {
+ var href = stylesheetLink.attr('href');
+ if (!href || href.indexOf('data') === 0) {
+ stylesheetLink.attr('href', stylesheetLink.attr('data-href'))
+ themeBtn.text('Disable theme preview')
+ }
+ else {
+ stylesheetLink.attr('href', '')
+ themeBtn.text('Preview theme')
+ }
+ })
+ })();
+
// tooltip demo
$('.tooltip-demo').tooltip({
selector: '[data-toggle="tooltip"]',