What I am trying to do is to store a list of hundreds of files in an array and use jquery load() function to load their content one after one by a loop.
I have very little knowledge of jquery and javascript, and this is what I managed to write, but it is not working.
var files=['index1c.html','index23c.html'];
for(var index = 0; index < files.length; index++){
var file = files[index];
$('#result').load('file .desc');
}
I think that I have some problem in variable file given in load() , is it the right way?
It is working fine if I directly write a single file name in place of file like below:
$('#result').load('index1c.html .desc');
.load()will overwrite the contents of#resultevery time a new file loads. Is this what you intend to happen?