我正在尝试制作一个有 9 个计时器的网站。但是计时器会在 1 秒后出现。我为每个计时器使用 setInterval 的代码。
$(document).ready(function(){
setInterval(function (){$('#load_time542').load('includes/tijd.php?article=ksm-1480-gold-extra');}, 1000);
setInterval(function (){$('#load_time219').load('includes/tijd.php?article=dutack-spijkertacker');}, 1000);
setInterval(function (){$('#load_time216').load('includes/tijd.php?article=buitenlamp-met-sensor');}, 1000);
setInterval(function (){$('#load_time547').load('includes/tijd.php?article=bouwmixer-mu-1600');}, 1000);
setInterval(function (){$('#load_time535').load('includes/tijd.php?article=doppenset-kwb-ratel');}, 1000);
setInterval(function (){$('#load_time533').load('includes/tijd.php?article=radiator-sanicare');}, 1000);
setInterval(function (){$('#load_time511').load('includes/tijd.php?article=werktafel-blackanddecker');}, 1000);
setInterval(function (){$('#load_time203').load('includes/tijd.php?article=betonmolen-+-kruiwagen');}, 1000);
setInterval(function (){$('#load_time529').load('includes/tijd.php?article=wandcloset-geberit');}, 1000);
});
加载时间 ID 是计时器倒计时的跨度。
问题是加载页面后,所有计时器都需要 1 秒才能显示出来。有人可以启发我如何解决这个问题吗?或者有关于如何有效地做到这一点的提示?