]> iEval git - gruntmaster-page.git/blame - js/90-custom.js
Title should use default heading font
[gruntmaster-page.git] / js / 90-custom.js
CommitLineData
7dc32473
MG
1function set_style(name){
2 $('#stylesheet').attr("href", "/css/" + name);
3 localStorage.setItem("theme", name);
4
5 $('#yardi').attr('src', name == "slate" || name == "cyborg" ? "/img/yardi-white.png" : "/img/yardi-blue.png");
6}
7
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
35679f84 18 $("textarea.autoresize").on('keyup', function () {
7dc32473
MG
19 content = $(this).val();
20
21 content = content.replace(/\n/g, '<br>');
22 hiddenDiv.html(content + '<br class="lbr">');
23
24 $(this).css('height', hiddenDiv.height()+23);
25 });
26
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"); });
30 $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); });
31});
32
33var theme = localStorage.getItem("theme");
34if(theme) {
35 set_style(theme);
36 $(document).ready(function(){
37 $('#yardi').attr('src', theme == "slate" || theme == "cyborg" ? "/img/yardi-white.png" : "/img/yardi-blue.png");
38 })
39}
40
41$( document ).ready(function() {
42 var sb=$('#sidebar').detach();
43 sb.appendTo($('#sponsors'));
7dc32473 44});
This page took 0.027082 seconds and 4 git commands to generate.