mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-27 05:49:07 +02:00
add button to toggle the optional theme when viewing the docs; fixes #9764
This commit is contained in:
@@ -53,6 +53,22 @@
|
||||
$('.bs-top').affix()
|
||||
}, 100)
|
||||
|
||||
// theme toggler
|
||||
;(function () {
|
||||
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 {
|
||||
stylesheetLink.attr('href', stylesheetLink.attr('data-href'))
|
||||
themeBtn.text('Deactivate Theme')
|
||||
}
|
||||
})
|
||||
})();
|
||||
|
||||
// tooltip demo
|
||||
$('.tooltip-demo').tooltip({
|
||||
selector: '[data-toggle="tooltip"]',
|
||||
|
Reference in New Issue
Block a user