我正在尝试运行 2 个函数,在页面完全加载后为一些图像设置动画(我正在使用 Jquery Circulate 插件)。我尝试了 $(document).ready(function
但图像在第一次加载时根本没有显示,它们仅在刷新页面后出现:
$( document ).ready(function() {
$(".zenn").each(function() {
$(this).circulate({
speed: Math.floor(Math.random()*300) + 100,
height: Math.floor(Math.random()*1000) - 470,
width: Math.floor(Math.random()*1000) - 470
});
});
$(".zenn").css("left", $(".zenn").position().left).circulate({
loop: true,
width: 0,
height: 10
});
});
网页链接:http://ngit.ma/jgr/
我将不胜感激,因为我是 Javascript 的新手。提前致谢。
最佳答案
关于javascript - 页面完全加载事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23913162/