-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest005_error.html
More file actions
20 lines (20 loc) · 1.05 KB
/
Copy pathtest005_error.html
File metadata and controls
20 lines (20 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html>
<head>
<link rel='stylesheet' type="text/css" href='base.css' />
<script src='imagelist.js'></script>
</head>
<body>
<div>This test case has images hidden directly with an inline style of display:none. The images are loaded because DemandJS works by replacing the image with separate loading animation, which doesnt take that same inline style. The alternative approach that does work, is for the display:none to be placed on a parent or wrapper of the image, and in this way the loading animation would also respect the same style.</div><br/><br/>
<script type="text/javascript">
for (var i = 0; i < window.test_images.length; i++) {i
var prop = '';
if (i%2==0) { prop = 'style="display:none;" ' }
document.write('<div style="border:thin solid #000;"><img ' + prop + 'src="' + window.test_images[i] + '" /></div><br/>');
}
</script>
<script src="../demandjs.debug.js"></script>
<script type="text/javascript" language="javascript">
var djs = new DemandJS();
</script>
</body>
</html>