A large-scale carousel, in which an ifream page is embedded in each page, it takes 15 seconds to enter the page to load. Obviously, I have tried to load it lazily, but the effect does not seem to be very good.
this is the demo code
<div class="slider iframe-wrapper">
<div>
<iframe id="iframe1" name="iframe1" src="http://123.56.29.74:9008/succezbi/meta/TOPAVENUE/analyses/TOPGSBGA/RPT_ZH_DPZS/report1?user=user&password=top@123&$sys_calcnow=true&$sys_showCaptionPanel=false"
frameborder="0"></iframe>
</div>
<div>
<iframe id="iframe2" name="iframe2" src="http://123.56.29.74:9008/succezbi/meta/TOPAVENUE/analyses/TOPGSBGA/RPT_ZH_DPZS/rpt_gdsscztcl?user=user&password=top@123&$sys_calcnow=true&$sys_showCaptionPanel=false"
frameborder="0"></iframe>
</div>
<div>
<iframe id="iframe3" name="iframe3" src="http://123.56.29.74:9008/succezbi/meta/TOPAVENUE/analyses/TOPGSBGA/RPT_ZH_DPZS/rpt_scztclfx?user=user&password=top@123&$sys_calcnow=true&$sys_showCaptionPanel=false"
frameborder="0"></iframe>
</div>
<div>
<iframe id="iframe4" name="iframe4" src="http://123.56.29.74:9008/succezbi/meta/TOPAVENUE/analyses/TOPGSBGA/RPT_ZH_DPZS/qrqyhs?user=user&password=top@123&$sys_calcnow=true&$sys_showCaptionPanel=false"
frameborder="0"></iframe>
</div>
<div>
<iframe id="iframe5" name="iframe5" src="http://123.56.29.74:9008/succezbi/meta/TOPAVENUE/analyses/TOPGSBGA/RPT_ZH_DPZS/kszzhy1?user=user&password=top@123&$sys_calcnow=true&$sys_showCaptionPanel=false"
frameborder="0"></iframe>
</div>
</div>
var count = $(".slider div iframe").size(); //iframe
console.log("count", count)
setTimeout(updateIframeSrc(count), 500);
function updateIframeSrc(index) {
// debugger
console.log(index)
var iframe = $(".slider div iframe").eq(index);
iframe.attr("src", iframe.attr("id"));
iframe.load(function () {
console.log("index",index);
setTimeout(function () {
updateIframeSrc(PPindex);
}, 500);
if(index==count){
return;
}
});
}