1

I am using jQUERY AUTOGROW FROM HERE

NOW I have many <textarea> that uses this plugin but I want some of my special <textarea> to auto grow up to a certain height it increases above that the '` must go overflow;

For example,

textarea-> original height->150px;
           if (keyup){ then autogrow }
           if(height>300px){overflow->auto}

How can I accomplish this?

a working example is facebook 's messaging <textarea> in https://www.facebook.com/messages/

Kindle Q
  • 944
  • 2
  • 19
  • 28
  • 1
    I would opt to add a new option to the plugin that specifies a max height. – Kevin B Apr 22 '14 at 18:02
  • how to add this @KevinB i call this autogrow like `$('textarea').autogrow();` but how to specify `max-height`? –  Apr 22 '14 at 18:26
  • well, the plugin itself would have to be modified. I took a quick shot at it and it didn't work, i'd suggest asking the author for help implementing such an option. You can contact the author through github https://github.com/ultimatedelman/autogrow – Kevin B Apr 22 '14 at 18:29
  • Can u give any other options ? or maybe any other plugin? to make itwork –  Apr 22 '14 at 18:35

1 Answers1

1

Change the flow?

if (keyup){
    if (height>300) {
        overflow->auto
    } else {
        autogrow
    }
}
nazim
  • 1,439
  • 2
  • 16
  • 26