]> iEval git - mindcoding-template-patches.git/blobdiff - js/scripts.js
Fix switching of yardi logo again
[mindcoding-template-patches.git] / js / scripts.js
index c7f0025400b482b23aa190884509bbeb0322928b..f11336a8de1103e34c4f2e87b1337800e4aebc6c 100644 (file)
@@ -1,6 +1,8 @@
 function set_style(name){
        $('#stylesheet').attr("href", "/css/" + name + ".var");
        localStorage.setItem("theme", name);
+
+       $('#yardi').attr('src', name == "slate" || name == "cyborg" ? "/img/yardi-white.png" : "/img/yardi-blue.png");
 }
 
 $( document ).ready(function() {
@@ -25,7 +27,12 @@ $( 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"))
+if(localStorage.getItem("theme")) {
        set_style(localStorage.getItem("theme"));
+       $(document).ready(function(){
+               $('#yardi').attr('src', name == "slate" || name == "cyborg" ? "/img/yardi-white.png" : "/img/yardi-blue.png");
+       })
+}
This page took 0.022301 seconds and 4 git commands to generate.