]> iEval git - gruntmaster-page.git/blame - js/90-themes.js
Make tracker less automatic and more resource-friendly
[gruntmaster-page.git] / js / 90-themes.js
CommitLineData
c7a5e4e0
MG
1(function(){
2 'use strict';
3 function set_style(name){
f06ba039 4 $('#stylesheet').attr("href", "/css/" + name + ".css");
c7a5e4e0
MG
5 localStorage.setItem("theme", name);
6 }
7dc32473 7
c7a5e4e0 8 $( document ).ready(function() {
c7a5e4e0
MG
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"); });
7dc32473
MG
13 });
14
c7a5e4e0
MG
15 var theme = localStorage.getItem("theme");
16 if(theme) {
17 set_style(theme);
18 }
19})();
This page took 0.031584 seconds and 4 git commands to generate.