]> iEval git - mindcoding-template-patches.git/blobdiff - js/scripts.js
Fix switching of yardi logo again
[mindcoding-template-patches.git] / js / scripts.js
index 9e4f7700dc800e773e639a84d4efe7dc50c3a598..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() {
@@ -28,5 +30,9 @@ $( document ).ready(function() {
        $('#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.024392 seconds and 4 git commands to generate.