]> iEval git - mindcoding-template-patches.git/blame - js/scripts.js
move div from footer to sidebar
[mindcoding-template-patches.git] / js / scripts.js
CommitLineData
4de434ba
MG
1function set_style(name){
2 $('#stylesheet').attr("href", "/css/" + name + ".var");
b78f93c9 3 localStorage.setItem("theme", name);
a84cee55 4
dd2a82d1 5 $('#yardi').attr('src', name == "slate" || name == "cyborg" ? "/img/yardi-white.png" : "/img/yardi-blue.png");
4de434ba
MG
6}
7
e9902b1b
S
8$( document ).ready(function() {
9 var txt = $('#comments');
10 hiddenDiv = $(document.createElement('div')),
11 content = null;
12
13 txt.addClass('txtstuff');
14 hiddenDiv.addClass('hiddendiv common');
15
16 $('body').append(hiddenDiv);
17
18 $(".form-control").on('keyup', function () {
4de434ba 19 content = $(this).val();
e9902b1b 20
4de434ba
MG
21 content = content.replace(/\n/g, '<br>');
22 hiddenDiv.html(content + '<br class="lbr">');
e9902b1b 23
4de434ba 24 $(this).css('height', hiddenDiv.height()+23);
e9902b1b
S
25 });
26
4de434ba
MG
27 $('#theme_slate' ).on('click', function () { set_style("slate"); });
28 $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
29 $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
88da92e7 30 $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); });
4de434ba 31});
b78f93c9 32
40221446
MG
33var theme = localStorage.getItem("theme");
34if(theme) {
35 set_style(theme);
dd2a82d1 36 $(document).ready(function(){
40221446 37 $('#yardi').attr('src', theme == "slate" || theme == "cyborg" ? "/img/yardi-white.png" : "/img/yardi-blue.png");
dd2a82d1
MG
38 })
39}
619c878d
S
40
41$( document ).ready(function() {
42 var sb=$('#sidebar').detach();
43 sb.appendTo($('#sponsors'));
44 console.log( "inside!" );
45});
This page took 0.030685 seconds and 4 git commands to generate.