开发者

jquery LOAD content simultaneously into different DIV

开发者 https://www.devze.com 2023-03-07 17:08 出处:网络
I have this code : $(\"#box1\").load(\"\"+ siteAddress +\"page/internal-url-1/\"); $(\"#box2\").load(\"\"+ siteAddress +\"page/internal-url-2/\");

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/")开发者_JAVA技巧;
     $('#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

0

精彩评论

暂无评论...
验证码 换一张
取 消