-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
55 lines (51 loc) · 1.65 KB
/
example.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Character Count - The Plugin</title>
<link rel="stylesheet" type="text/css" href="css/char-count.css" />
<style>
input, textarea {
padding: 5px;
}
</style>
</head>
<body>
<h1 >Character Count</h1>
<div style="position: relative; display: inline-block; ">
<input type="text" value="" class="gs-char-count" placeholder="Enter value" />
</div><br /><br /><br />
<input type="text" data-char-count="true" value="" placeholder="Enter value" /><br /><br /><br />
<textarea rows="5" cols="100" ></textarea>
<!-- core JavaScript -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/char-count.min.js"></script>
<script type="text/javascript">
$(function() {
$('[data-char-count]').char_count({
maxValue: 100,
showMaxValue: false,
background: "#605ca8",
hideOnBlur: true,
});
$('.gs-char-count').char_count({
maxValue: 10,
showMaxValue: true,
background: "#34BC00",
hideOnBlur: false,
position: "bottom",
});
$('textarea').char_count({
maxValue: 100,
showMaxValue: true,
background: "#dd4b39",
hideOnBlur: false,
position: "bottom",
});
})
</script>
</body>
</html>