]>
iEval git - mindcoding-template-patches.git/blob - js/scripts.js
1 function set_style(name
){
2 $('#stylesheet').attr("href", "/css/" + name
+ ".var");
3 localStorage
.setItem("theme", name
);
5 if(name
== "slate" || name
== "cyborg") {
6 $('#yardi').attr("src", "/img/yardi-white.png");
10 $( document
).ready(function() {
11 var txt
= $('#comments');
12 hiddenDiv
= $(document
.createElement('div')),
15 txt
.addClass('txtstuff');
16 hiddenDiv
.addClass('hiddendiv common');
18 $('body').append(hiddenDiv
);
20 $(".form-control").on('keyup', function () {
21 content
= $(this).val();
23 content
= content
.replace(/\n/g, '<br>');
24 hiddenDiv
.html(content
+ '<br class="lbr">');
26 $(this).css('height', hiddenDiv
.height()+23);
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"); });
35 if(localStorage
.getItem("theme"))
36 set_style(localStorage
.getItem("theme"));
This page took 0.04796 seconds and 5 git commands to generate.