Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <hr> <pre><code> *Upate* </code></pre> <hr> <p>Hi, thanks for the answers but I am still racking my brain over this problem. basically i can get each part to work seperatly, but not all together.</p> <p>The problem I cannot get my head around is this:<br> To be able to fade the image ontop of the loading.gif, the gif needs to be a bg image.<br> To load the images, an ajax request is needed and images are only loaded on the page once they have successfully loaded via ajax.<br> I need the loading.gif's to load with the page, which means I have to set up a blank structure of 100 LI's on the page.<br> I can then use <code>.html()</code> to insert the <code>&lt;img src=[url from xml file] /&gt;</code> into the LI.. yes? But the problem I am having is that the page freezes while it is doing this and it loads all the images at once as opposed to one at a time.</p> <p>So I thought, create a function that each img can run onload, which starts the ajax script to get the next image to load.<br> I don't think this is great. And I am having a problem writing the function.<br> Theory of it goes: </p> <p>image0 loads and fades in,<br> image0 completes loading and activates <code>loadNext()</code><br> In <code>loadnext()</code> : the id is increased, (which is an attr in the xml starting 0 to 100)<br> get the url (which is an element in xml) relevant to the new id<br> add to the unordered list, and run <code>loadNext()</code> on image1 onload.</p> <p>I cant get it to work though :( help please</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload