aboutsummaryrefslogtreecommitdiff
path: root/docs/assets/js/_src/application.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/assets/js/_src/application.js')
-rw-r--r--docs/assets/js/_src/application.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/assets/js/_src/application.js b/docs/assets/js/_src/application.js
index 655f14612..0a719b1f9 100644
--- a/docs/assets/js/_src/application.js
+++ b/docs/assets/js/_src/application.js
@@ -58,14 +58,15 @@
var stylesheetLink = $('#bs-theme-stylesheet')
var themeBtn = $('#bs-theme-btn')
themeBtn.click(function () {
- if (stylesheetLink.attr('href')) {
- stylesheetLink.attr('href', '')
- themeBtn.text('Activate Theme')
- }
- else {
+ var href = stylesheetLink.attr('href');
+ if (!href || href.indexOf('data') === 0) {
stylesheetLink.attr('href', stylesheetLink.attr('data-href'))
themeBtn.text('Deactivate Theme')
}
+ else {
+ stylesheetLink.attr('href', '')
+ themeBtn.text('Activate Theme')
+ }
})
})();