adds resizeble textbox
authorS7012MY <l3asketballplayer@yahoo.com>
Sat, 25 Jan 2014 18:28:51 +0000 (20:28 +0200)
committerS7012MY <l3asketballplayer@yahoo.com>
Sat, 25 Jan 2014 18:28:51 +0000 (20:28 +0200)
css/style.css
js/scripts.js

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a092440cdbaee4ab051fe9b82bc47c6a2f763446 100644 (file)
@@ -0,0 +1,10 @@
+.txtstuff {
+    overflow: hidden;
+}
+
+.hiddendiv {
+    display: none;
+    white-space: pre-wrap;
+    word-wrap: break-word;
+    overflow-wrap: break-word; /* future version of deprecated 'word-wrap' */
+}
\ No newline at end of file
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..fc421abf857cb25aaf509066c3c696f606cf81e8 100644 (file)
@@ -0,0 +1,22 @@
+$( document ).ready(function() {
+    var txt = $('#comments');
+    hiddenDiv = $(document.createElement('div')),
+    content = null;
+
+    txt.addClass('txtstuff');
+    hiddenDiv.addClass('hiddendiv common');
+
+    $('body').append(hiddenDiv);
+
+    $(".form-control").on('keyup', function () {
+
+    content = $(this).val();
+
+    content = content.replace(/\n/g, '<br>');
+    hiddenDiv.html(content + '<br class="lbr">');
+
+    $(this).css('height', hiddenDiv.height()+23);
+
+       });
+
+});
\ No newline at end of file
This page took 0.01159 seconds and 4 git commands to generate.