-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathindex.html
129 lines (113 loc) · 4.6 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html>
<head>
<title>ytLoad Demo</title>
<link href="ytLoad.jquery.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.transit.js"></script>
<script type="text/javascript" src="ytLoad.jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var examples = {
basic: function() {
$.ytLoad();
},
manual: function() {
$.ytLoad({
registerAjaxHandlers: false
});
$.ytLoad('start');
$.ytLoad('complete');
$.ytLoad('error');
},
customDurations: function() {
$.ytLoad({
startPercentage: 50,
startDuration: 2000,
completeDuration: 500,
fadeDelay: 2000,
fadeDuration: 2000
});
},
setProgress: function() {
$.ytLoad({
registerAjaxHandlers: false
});
$.ytLoad('progress', 50);
alert($.ytLoad('progress'));
$.ytLoad('progress', 100);
},
callbacks: function() {
$.ytLoad({
onStart: function() {
alert('Started!');
},
onComplete: function() {
alert('Complete!');
}
});
},
multipleRequests: function() {
$.ytLoad();
for(i=0; i < 2000; i++) {
$('#ajaxContent').load('ajax.html');
}
}
};
$('#loadButton').click(function(){
$('#ajaxContent').load('ajax.html');
});
$('#usageType').change(function() {
$.ytLoad('destroy');
examples[$(this).val()]();
});
examples.basic();
});
</script>
<style>
body {
margin: 0px;
padding: 0px;
background-color: #EBEBEB;
border-bottom: 1px solid #e8e8e8;
}
#topBar {
height: 25px;
padding: 7px;
padding-left: 15px;
background-color: #F1F1F1;
}
#socialCodingButtons {
float: right;
}
#ajaxContent {
width: 800px;
margin: auto;
margin-top: 15px;
}
</style>
</head>
<body>
<div id="topBar">
<select id="usageType" name="usageType">
<option value="basic">Basic</option>
<option value="manual">Manual Trigger</option>
<option value="customDurations">Custom Durations</option>
<option value="setProgress">Set Progress</option>
<option value="callbacks">Use Callbacks</option>
<option value="multipleRequests">Multiple Requests</option>
</select>
<input id="loadButton" type="submit" value="Load">
<div id="socialCodingButtons">
<iframe src="http://ghbtns.com/github-btn.html?user=Mythli&repo=jquery.ytload&type=watch&count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="80" height="20"></iframe>
<iframe src="http://ghbtns.com/github-btn.html?user=mythli&repo=jquery.ytload&type=fork&count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="80" height="20"></iframe>
<iframe src="http://ghbtns.com/github-btn.html?user=Mythli&repo=jquery.ytload&type=follow&count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="140" height="20"></iframe>
</div>
</div>
<div id="ajaxContent">
</div>
</body>
</html>