-
Notifications
You must be signed in to change notification settings - Fork 67
/
index.html
84 lines (84 loc) · 2.73 KB
/
index.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Autogrow Textarea Plugin</title>
<style>
body {
font-family: Georgia, serif;
font-size: 16px;
line-height: 1.5em;
}
p {
margin: 0em 0em 1.5em;
}
p.first {
font-size: 1.2em;
}
#content {
width: 980px;
margin: auto;
}
#target {
font-family: arial;
font-size: 14px;
width: 322px;
}
.quote {
font-style: italic;
color: #666;
}
textarea {
}
</style>
<script src="jquery-1.8.1.min.js"></script>
<script src="jquery.autogrowtextarea.min.js"></script>
<script>
$(document).ready(function() {
$("#target").autoGrow({
extraLine: true // Adds an extra line at the end of the textarea. Try both and see what works best for you.
});
});
</script>
</head>
<body>
<div id="content">
<p class="first">
This is the demo page for the Autogrow Textarea plugin. You can read the <a href="http://www.technoreply.com/autogrow-textarea-plugin-3-0/">full blogpost here</a>.
</p>
<ol>
<li>
<p>
The textarea below will grow vertically as you type in some text. Go a head and give it a try:
</p>
<p>
<textarea id="target" rows="4"></textarea>
</p>
</li>
<li>
<p>
It also works when copy/pasting text. Here's a bunch of text you can paste in the textarea:
</p>
<div class="quote">
<p>
Grab us a mullet where come a top end. As dry as a chuck a sickie piece of piss he hasn't got a coldie. As dry as a wuss heaps it'll be down under. As cross as a slab she'll be right billy. Shazza got us some ya no worries lets throw a fremantle doctor. Stands out like a freckle no dramas he's got a massive yakka. As cross as a booze bus heaps as cross as a blow in the bag.
</p>
<p>
Come a sheila to we're going bonza. As stands out like gobsmacked my as dry as a road train. He hasn't got a dog's balls no dramas we're going rego. You little ripper bottle-o heaps get a dog up ya your shout. As stands out like cracker with as dry as a coathanger. Stands out like a sickie my as dry as a ropeable. As stands out like sanger we're going lurk. As cross as a jumbuck mate built like a pretty spiffy. He hasn't got a bitzer to as busy as a pav. You little ripper vee dub to she'll be right mickey mouse mate. As busy as a freckle no dramas lets throw a bizzo.
</p>
</div>
</li>
<li>
<p>
Want to see how it's done? Just hit view source! It's dead simple. ;-)
</p>
</li>
<li>
<p>
This plugin is licensed under <a href="http://en.wikipedia.org/wiki/Beerware">Beerware License</a>. So go crazy with it, and don't forget to say thanks <a href="http://www.technoreply.com/autogrow-textarea-plugin-3-0/">on my blog</a>.
</p>
</li>
</ol>
</div>
</body>
</html>