Split 90-custom into 90-autoresize and 90-themes
[gruntmaster-page.git] / js / 90-autoresize.js
1 (function(){
2 'use strict';
3
4 $( document ).ready(function() {
5 var hiddenDiv = $(document.createElement('div'));
6
7 hiddenDiv.addClass('hiddendiv common');
8
9 $('body').append(hiddenDiv);
10
11 $("textarea.autoresize").on('keyup', function () {
12 var content = $(this).val();
13
14 content = content.replace(/\n/g, '<br>');
15 hiddenDiv.html(content + '<br class="lbr">');
16
17 $(this).css('height', hiddenDiv.height()+23);
18 });
19 });
20 })();
This page took 0.021487 seconds and 4 git commands to generate.