Split 90-custom into 90-autoresize and 90-themes
[gruntmaster-page.git] / js / 90-themes.js
1 (function(){
2 'use strict';
3 function set_style(name){
4 $('#stylesheet').attr("href", "/css/" + name + ".css");
5 localStorage.setItem("theme", name);
6 }
7
8 $( document ).ready(function() {
9 $('#theme-selector').removeClass('hidden');
10 $('#theme_slate' ).on('click', function () { set_style("slate"); });
11 $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
12 $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
13 $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); });
14 });
15
16 var theme = localStorage.getItem("theme");
17 if(theme) {
18 set_style(theme);
19 }
20 })();
This page took 0.021397 seconds and 4 git commands to generate.