简体   繁体   中英

Load specific html content via AJAX from a page that is loaded via ajax

I want to make ajax call to load some specific div to my webpage. But the content I wanna load is itself loaded via ajax, so I can't get the full html content as I want.

function loadajax(){  
$.ajax({ url: 'http://callcom-com-au.myshopify.com/products/repair',
    crossDomain: true,
    method:'post',
    dataType: 'html', 
    success: function(response) { 
      $('#customer_reviews').html(jQuery(response).find('.spr-header').html());
      $('.spr-icon').css('color','#f3b41b');
    }
   });
  }
$('document').ready(function(){
setTimeout(loadajax,10000);

});

Is there any workaround. Any help would be appreciated.

Simply open this page http://callcom-com-au.myshopify.com/products/repair and firebug/google-chrome-web-tools etc. and click tab Network. Then grab direct link to content you want to get.

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