0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

nuke theme toggler js

This commit is contained in:
Mark Otto 2015-03-09 15:02:51 +00:00
parent e29455814f
commit edecd2c5f3

View File

@ -32,33 +32,6 @@
// e.preventDefault()
// })
// theme toggler
(function () {
var stylesheetLink = $('#bs-theme-stylesheet')
var themeBtn = $('.bs-docs-theme-toggle')
var activateTheme = function () {
stylesheetLink.attr('href', stylesheetLink.attr('data-href'))
themeBtn.text('Disable theme preview')
localStorage.setItem('previewTheme', true)
}
if (localStorage.getItem('previewTheme')) {
activateTheme()
}
themeBtn.click(function () {
var href = stylesheetLink.attr('href')
if (!href || href.indexOf('data') === 0) {
activateTheme()
} else {
stylesheetLink.attr('href', '')
themeBtn.text('Preview theme')
localStorage.removeItem('previewTheme')
}
})
})
// Tooltip and popover demos
$('.tooltip-demo').tooltip({
selector: '[data-toggle="tooltip"]',