Last active
February 1, 2016 18:02
-
-
Save MiniCodeMonkey/9114769 to your computer and use it in GitHub Desktop.
Paste this in your JavaScript console to easily switch between Bootswatch styles to help pick the right one for your site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var themes = [ | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/cerulean/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/cosmo/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/cyborg/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/darkly/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/flatly/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/journal/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/lumen/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/paper/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/readable/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/sandstone/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/simplex/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/slate/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/spacelab/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/superhero/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/united/bootstrap.min.css', | |
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/yeti/bootstrap.min.css' | |
]; | |
function useTheme(i) { | |
$('link').each(function () { | |
if ($(this).attr('href').indexOf('bootstrap.min.css') != -1) { | |
$(this).attr('href', themes[i]); | |
return false; // Break | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment