forked from jackmoore/autosize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
36 lines (33 loc) · 1.28 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'/>
<title>Textarea Autosize Demo</title>
<style>
textarea {
border:2px solid #ccc;
padding: 10px;
vertical-align: top;
width: 25%;
}
.animated {
-webkit-transition: height 0.2s;
-moz-transition: height 0.2s;
transition: height 0.2s;
}
</style>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js'></script>
<script src='jquery.autosize.js'></script>
<script>
$(function(){
$('.normal').autosize();
$('.animated').autosize({append: "\n"});
});
</script>
</head>
<body>
<textarea class='normal'>Not animated.</textarea>
<textarea class='normal'>The coconut palm (also, cocoanut), Cocos nucifera, is a member of the family Arecaceae (palm family). It is the only accepted species in the genus Cocos.[2] The term coconut can refer to the entire coconut palm, the seed, or the fruit, which, botanically, is a drupe, not a nut. The spelling cocoanut is an archaic form of the word.[3] The term is derived from 16th-century Portuguese and Spanish coco, meaning "head" or "skull",[4] from the three small holes on the coconut shell that resemble human facial features.</textarea>
<textarea class='animated'>With CSS transition.</textarea>
</body>
</html>