Mark everything that requires javascript with class reqjs
[plack-app-gruntmaster.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_slate' ).on('click', function () { set_style("slate"); });
10 $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
11 $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
12 $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); });
13 });
14
15 var theme = localStorage.getItem("theme");
16 if(theme) {
17 set_style(theme);
18 }
19 })();
This page took 0.022118 seconds and 5 git commands to generate.