]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/frameworks/autosize/readme.md
Merge pull request #6541 from annando/mentions
[friendica.git] / view / theme / frio / frameworks / autosize / readme.md
1 ## Summary
2
3 Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.
4
5 #### Demo
6
7 Full documentation and a demo can be found at [jacklmoore.com/autosize](http://jacklmoore.com/autosize)
8
9 #### Install via NPM
10 ```bash
11 npm install autosize
12 ```
13
14 #### Browser compatibility
15
16 Chrome | Firefox | IE | Safari | iOS Safari | Android | Opera Mini | Windows Phone IE
17 ------ | --------|----|--------|------------|---------|------------|------------------
18 yes    | yes     | 9  | yes    | yes        | 4       | ?          | 8.1
19
20 #### Usage
21
22 The autosize function accepts a single textarea element, or an array or array-like object (such as a NodeList or jQuery collection) of textarea elements.
23
24 ```javascript
25 // from a NodeList
26 autosize(document.querySelectorAll('textarea'));
27
28 // from a single Node
29 autosize(document.querySelector('textarea'));
30
31 // from a jQuery collection
32 autosize($('textarea'));
33 ```
34
35 Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php)