Using jQuery I would like to loop through an array of links and load the contents of each link into a DIV after a set interval. For example, if I have my parent page \"paren
DOM manipulation is expensive. Try not to do it if you can avoid it.
Are the links you're loading static or dynamic? Meaning once loaded do you need to load them again? If the answer is no then do this:
with CSS:
#carousel div { display: none; }
and:
var pages = ["text1.html", "text2.html", "text3.html"];
$(function() {
for (int i=0; iThis way you only load the pages once and just hide/show divs as needed to rotate through them.