I have a loading problem with external html and images. I want to load an external html (examplework.html
) in a overlay-div, and when its totally loaded, i want to show it.
So the actual status is:
Jquery call on a Click-Event in the Main-HTML-Page:
$('#overlaycontent').load("examplework.html", function() {
$('#overlaycontent').removeClass("loadingwork").addClass('loadedwork');
});
The examplework.html looks like this:
<div class="workdetail">
<p>TEXT</p>
<img class="extimgload" src="http://mydomain.de/works/1.jpg" alt="Description">
<img class="extimgload" src="http://mydomain.de/works/2.jpg" alt="Description">
<img class="extimgload" src="http://mydomain.de/works/3.jpg" alt="Description">
</div>
The Main Html-Page and the example.work are in the same folder.
The src
attributes of the images are absolute paths (because relative paths could cause problems, i`ve read in another discussion here)
Now the examplework.html
is loaded and then displayed instead of a loading. That works fine. But the images are not yet loaded, so I see the 3 alt-descriptions and then they are replaced with the images, when each is ready loaded.
But I want to show the overlay, when everything is loaded. Is there a solution for this problem?