I have this code:
<script type="text/javascript">
$(document).ready(function(){
var id = 'i1';
var image = new Image();
image.src = 'http://url_to_my_image';
image.onload = function(){
$('#m' + id).attr('src',image.src);
$('#m' + id).show();
};
});
</script>
<ul style="list-style: none; margin: 0px; padding: 0px;">
<li id="i1" style="display: inline;">
<div style="background-color: #bbb; width:768px;height:1024px;"><div style="margin-top:505px; margin-left: 370px; font-size: 24px; font-family: Arial, sans-serif; color: #333;">Load...</div></div>
<img src="" id="#mi1" style="display: hidden;" />
</li>
</ul>
But this not work. I want to display all empty pages with text “Loading…” and after load image page insert it to the relevant img element.
Sorry for my terrible english…
Try this:
You can read more on this on: api.jquery.com/load/