X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2Fscripts.js;h=4872092b65f9fb2f021df0be03027c70f6c5e334;hb=HEAD;hp=9e4f7700dc800e773e639a84d4efe7dc50c3a598;hpb=88da92e702d2f02d56047f54b5dbcb025d49b1f9;p=mindcoding-template-patches.git diff --git a/js/scripts.js b/js/scripts.js index 9e4f770..4872092 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -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,16 @@ $( 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', theme == "slate" || theme == "cyborg" ? "/img/yardi-white.png" : "/img/yardi-blue.png"); + }) +} + +$( document ).ready(function() { + var sb=$('#sidebar').detach(); + sb.appendTo($('#sponsors')); + console.log( "inside!" ); +});