-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.html
More file actions
62 lines (58 loc) · 2.75 KB
/
Example.html
File metadata and controls
62 lines (58 loc) · 2.75 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="./jquery.shrinktofit.js" ></script>
<style>
.box{
border-style:solid;
border-width:1px;
border-color: red;
}
</style>
</head>
<body>
<div>
<h1>Example of the Shrink To Fit plugin</h1>
<div style="width:500px;height:50px;" id="area-to-shrink" class="box resize-text">
<span>THISTEXTISWAYTOOBIGFORTHISDIVTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAY</span>
</div>
<div style="width:500px;height:50px;" id="area-to-shrink" class="box resize-text">
<span>ThisWillResultsInMinFontSizeTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAY</span>
</div>
<div style="width:500px;height:50px;" id="area-to-shrink" class="box resize-text">
<span>THISTEXTIStoosmall</span>
</div>
<div style="width:500px;height:50px;" id="area-to-shrink" class="box resize-text">
<span>12346123412341234123412341234123412341234123412341324</span>
</div>
<div style="width:500px;height:50px;" id="area-to-shrink" class="box resize-text">
<span>1234612341234123412341234123412341234123412341234132434123412341234123412341324</span>
</div>
<div style="width:500px;height:50px;" id="area-to-shrink" class="box resize-text">
<span>123461234123412341234123412341234123412341234123413243412341234123412341234132434123412341234123412341324</span>
</div>
<div style="width:500px;height:50px;" id="area-to-shrink" class="box resize-text">
<span>asdkfjlhasdfkj askdjhfasdfoawerjk23481234 132 1324 </span>
</div>
<div style="width:500px;height:50px;" id="area-to-shrink" class="box resize-text">
<span >THISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAYTOBIGFORTHISDIVTHISTEXTISWAY</span>
</div>
</div>
<script>
if (!console) {
var console = window.console || {
"log": function() {
}
};
}
$('.resize-text').shrinkToFit({
debug: true,
success:function(){console.log("success");},
fail: function(){console.log("fail");},
complete: function(){console.log("complete");}
});
</script>
</body>
</html>