diff options
| author | Mark Otto <[email protected]> | 2014-05-22 20:57:10 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2014-05-22 20:57:10 -0700 |
| commit | a375069704e88b4f7659dcd4a74a6239bfefba8c (patch) | |
| tree | ed7f7f37330ba9e750c29cf0d1e9677e9f30c71c /docs/assets/js/_src | |
| parent | ef360b61b5eb79982e85d8c8380de69ef16395a6 (diff) | |
| parent | 68de4bf387650aa83f5138ef114adf88f40f9871 (diff) | |
| download | bootstrap-a375069704e88b4f7659dcd4a74a6239bfefba8c.tar.xz bootstrap-a375069704e88b4f7659dcd4a74a6239bfefba8c.zip | |
Merge branch 'master' of github.com:twbs/bootstrap
Diffstat (limited to 'docs/assets/js/_src')
| -rw-r--r-- | docs/assets/js/_src/application.js | 17 |
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"]', |
