]>
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
);
6 $( document
).ready(function() {
7 var txt
= $('#comments');
8 hiddenDiv
= $(document
.createElement('div')),
11 txt
.addClass('txtstuff');
12 hiddenDiv
.addClass('hiddendiv common');
14 $('body').append(hiddenDiv
);
16 $(".form-control").on('keyup', function () {
17 content
= $(this).val();
19 content
= content
.replace(/\n/g, '<br>');
20 hiddenDiv
.html(content
+ '<br class="lbr">');
22 $(this).css('height', hiddenDiv
.height()+23);
25 $('#theme_slate' ).on('click', function () { set_style("slate"); });
26 $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
27 $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
28 $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); });
31 if(localStorage
.getItem("theme"))
32 set_style(localStorage
.getItem("theme"));
This page took 0.052092 seconds and 5 git commands to generate.