简体   繁体   中英

jquery LOAD content simultaneously into different DIV

I have this code :

$("#box1").load(""+ siteAddress +"page/internal-url-1/");
  $("#box2").load(""+ siteAddress +"page/internal-url-2/");

  var refreshId = setInterval(function(){
     $("#box1").load(""+ siteAddress +"page/internal-url-1/");
     $('#box2').load(""+ siteAddress +"page/internal-url-2/");

  }, 10000);

i only get load result form "internal-url-1", the "#box2" keep empty, it doesn't load the content.Any body know how to fixed this ??

Thank you guys...

its seem that code is ok, but may be the timer problem because 1000 ms = 1 second so 10000 ms = 10 second and the time to load the page is greator than 10 seconds so that is why the box2 is not loaded. its just an assumption

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM