I'd like to load some HTML from an external source, and then fade/load parts of it one at a time onto my current page.
The external html looks like:
<div id="entries">
<div class="entry">A</div>
<div class="entry">B</div>
<div class="entry">C</div>
</div>
And I can get each "entry" by doing this:
$.get('external.html', function(responseText) {
var $response = $(responseText);
var $entries = $response.find('div.entry');
$entries.each(function(index, $entry) {
// TODO - fade in each entry every x seconds onto the main page
// $('#entries').html($entry.outerHTML);
});
});
What I can't work out is how to delay the loading of each entry so that on the main page the entry changes every x seconds.
Can anyone help?
Thanks!