forked from jackmoore/autosize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zepto-demo.html
45 lines (41 loc) · 1.5 KB
/
zepto-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
37
38
39
40
41
42
43
44
45
<!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%;
/*-webkit-box-sizing: border-box;*/
/*-moz-box-sizing: border-box;*/
/*box-sizing: border-box;*/
}
.boxSized {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.animated {
-webkit-transition: height 0.2s;
-moz-transition: height 0.2s;
transition: height 0.2s;
}
</style>
<script src='public/components/zepto/zepto.js'></script>
<script src='zepto.autosize.js'></script>
<script>
$(function(){
$('.normal').autosize();
$('.animated').autosize({append: "\n"});
});
</script>
</head>
<body>
<textarea class='normal'>Not animated.</textarea>
<textarea class='normal boxSized'>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>