Reputation: 3
I have a page with my portfolio. I want to show people two projects at the time with a picture beside it.
Under my projects, there is a "Load more" button.
Everything works in IE9, Firefox and Chrome, but not in IE8 (maybe IE7 as well).
See example: link deleted
The JPEGs of the projects wont load in ie8, but the other images do. It's strange. The format of the JPEGs is RGB. Even a .png
doesn't work.
The code is:
<script type="text/javascript">
$(window).load(function() {
$(".projecten").slice(0, 2).show(); // select the first five
$("#load").click(function(e){ // click event for load more
e.preventDefault();
$(".projecten:hidden").slice(0, 2).show(); // select next 5 hidden divs and show them
if($(".projecten:hidden").length == 0){ // check if any hidden divs still exist
alert("Alle projecten zijn nu geladen."); // alert if there are none left
}
});
});
</script>
<style type"text/css">
.projecten {
display:none;
z-index:5;
}
</style>
<h1>Projecten</h1><br>
<p>Some text</p><br>
<div class="projecten"><div id="inhoud"><table width="924" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td width="210" style="text-align:left;vertical-align:top"><img src="Figuren/Projecten/Parallelweg 2e fase.jpg" width="210" height="297" longdesc="Parallelweg 2e fase"></td>
<td width="35"></td>
<td style="text-align:left;vertical-align:top"><b>Parallelweg 's-Hertogenbosch 2e fase </b>
<i>text.... </i><br>text......
</td>
</tr>
</table>
</div>
</div>
What can I do to fix this?
Upvotes: 0
Views: 355
Reputation: 76003
Remove the spaces from the image filenames. The images on your site that do not have spaces in the filenames appear just fine for me.
Change:
<img src="Figuren/Projecten/Parallelweg 2e fase.jpg" width="210" height="297" longdesc="Parallelweg 2e fase">
To:
<img src="Figuren/Projecten/Parallelweg%202e%20fase.jpg" width="210" height="297" longdesc="Parallelweg 2e fase" />
Also see that I closed the <img />
tag by adding a forward slash before the end of the tag.
Or you could ditch the spaces all together and replace them with something else like an underscore (_
) or a hyphen (-
):
<img src="Figuren/Projecten/Parallelweg-2e-fase.jpg" width="210" height="297" longdesc="Parallelweg 2e fase" />
This would require you to change the file's name on the server so it would be properly referenced.
Upvotes: 1