X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2Fscripts.js;fp=js%2Fscripts.js;h=6e0827d502cbfd8f76c77e025bca4c824c0ed27c;hb=402214460813cdd1990363deadc431191a627382;hp=f11336a8de1103e34c4f2e87b1337800e4aebc6c;hpb=dd2a82d1604a8bb280568b03417210a3eef63520;p=mindcoding-template-patches.git diff --git a/js/scripts.js b/js/scripts.js index f11336a..6e0827d 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -30,9 +30,10 @@ $( document ).ready(function() { $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); }); }); -if(localStorage.getItem("theme")) { - set_style(localStorage.getItem("theme")); +var theme = localStorage.getItem("theme"); +if(theme) { + set_style(theme); $(document).ready(function(){ - $('#yardi').attr('src', name == "slate" || name == "cyborg" ? "/img/yardi-white.png" : "/img/yardi-blue.png"); + $('#yardi').attr('src', theme == "slate" || theme == "cyborg" ? "/img/yardi-white.png" : "/img/yardi-blue.png"); }) }