]> iEval git - mindcoding-template-patches.git/blob - js/scripts.js
Add Yardi logo
[mindcoding-template-patches.git] / js / scripts.js
1 function set_style(name){
2 $('#stylesheet').attr("href", "/css/" + name + ".var");
3 localStorage.setItem("theme", name);
4
5 if(name == "slate" || name == "cyborg") {
6 $('#yardi').attr("src", "/img/yardi-white.png");
7 }
8 }
9
10 $( document ).ready(function() {
11 var txt = $('#comments');
12 hiddenDiv = $(document.createElement('div')),
13 content = null;
14
15 txt.addClass('txtstuff');
16 hiddenDiv.addClass('hiddendiv common');
17
18 $('body').append(hiddenDiv);
19
20 $(".form-control").on('keyup', function () {
21 content = $(this).val();
22
23 content = content.replace(/\n/g, '<br>');
24 hiddenDiv.html(content + '<br class="lbr">');
25
26 $(this).css('height', hiddenDiv.height()+23);
27 });
28
29 $('#theme_slate' ).on('click', function () { set_style("slate"); });
30 $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
31 $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
32 $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); });
33 });
34
35 if(localStorage.getItem("theme"))
36 set_style(localStorage.getItem("theme"));
This page took 0.04796 seconds and 5 git commands to generate.