X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2Fscripts.js;h=9e4f7700dc800e773e639a84d4efe7dc50c3a598;hb=ba2dbdbfe2082f76451eeb5aba16be857faf4395;hp=5ba7ecd937a64bd461105813e6f857acc70318ed;hpb=4de434ba06710b69447709534f43c6b956a55b30;p=mindcoding-template-patches.git diff --git a/js/scripts.js b/js/scripts.js index 5ba7ecd..9e4f770 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -1,5 +1,6 @@ function set_style(name){ $('#stylesheet').attr("href", "/css/" + name + ".var"); + localStorage.setItem("theme", name); } $( document ).ready(function() { @@ -24,4 +25,8 @@ $( document ).ready(function() { $('#theme_slate' ).on('click', function () { set_style("slate"); }); $('#theme_cerulean').on('click', function () { set_style("cerulean"); }); $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); }); + $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); }); }); + +if(localStorage.getItem("theme")) + set_style(localStorage.getItem("theme"));