forked from 1Marc/hisrc
-
Notifications
You must be signed in to change notification settings - Fork 63
/
DEMO.html
43 lines (34 loc) · 1002 Bytes
/
DEMO.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
<!doctype html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script src="hisrc.js"></script>
<script>
// for testing purposes clear local storage each time to remove cached network speed tests
try {
localStorage.removeItem("fsjs");
} catch( e ) { }
// for performance run speed test before dom is ready.
$.hisrc.speedTest({ speedTestUri: '50K.jpg' });
$(document).ready(function(){
$(".hisrc img").hisrc({
useTransparentGif: true,
speedTestUri: '50K.jpg',
transparentGifSrc: 'TEST/spacer.gif' // use for IE
});
});
</script>
</head>
<body>
<h1>HiSRC Images</h1>
<div class="hisrc">
<img src="TEST/halloween-mobile-1st.png" width="250" height="222"
data-1x="TEST/halloween-x1.png"
data-2x="TEST/halloween-x2.jpg"
alt="Celebrating Halloween in style" />
</div>
<h2>Regular images</h2>
<img src="http://placehold.it/400x200.png">
<img src="http://placehold.it/400x200.png">
</body>
</html>