-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·118 lines (71 loc) · 2.85 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
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS : implied media="all" -->
<link rel="stylesheet" href="css/style.css?v=2">
</head>
<body>
<div id="container">
<header>
<h1>Simple Queue v.1</h1>
</header>
<div id="main">
<div id="test3" class="test">
<pre id="console">
console:
</pre>
</div>
<!-- <div id="test4" class="test">
second queue
</div> -->
</div>
<footer>
</footer>
</div> <!--! end of #container -->
<!-- Javascript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script>
<script type="text/javascript" src="js/jquery.simple_queue-.1.js"></script>
<script type="text/javascript" charset="utf-8">
// SOME QUICK TESTING OUTPUT FUNCTIONS
$.date = new Date();
// log to html
function logTo(id, message){
// $.date == undefined ? : $.date;
var t = (new Date() - $.date)
$(id).append('<p>'+t+' | '+message+'</p>');
}
// optional event handler. If you need to add methods to the image,
// or do some clean off (kick off another queue?) do it here.
function handleQueueFinished(){
$("img").click(function(event) {
log($(this).attr('src')+" | elapsed load time: "+$(this).attr('elap_time')+" | position in queue: "+$(this).attr('q_id'));
});
}
// FIRE UP A QUEUE AND START IT
var q1 = new SimpleQueue();
q1.add('http://cf.i0i0i.net/core/labs/images/bigimage.jpg', 'big image', $('#test3'));
q1.add('http://cf.i0i0i.net/core/labs/images/bigimage2.jpg', 'big image', $('#test3'));
q1.start();
// var q2 = new SimpleQueue();
// q2.add('http://cf.i0i0i.net/core/labs/images/bigimage.jpg', 'big image', $('#test4'));
// q2.add('http://cf.i0i0i.net/core/labs/images/bigimage2.jpg', 'big image', $('#test4'));
// q2.start();
</script>
</body>
</html>