我目前正在使用此脚本淡化页面转换:
$(document).ready(function() {
$(window).bind("unload", function() {});
$("body").css("display", "none");
$("body").hide();
$("body").fadeIn(2000);
$('a.fade1, a.fade2, a.fade3, a.fade4').click(function(event) {
event.preventDefault();
linkLocation = this.href;
$("body").fadeOut(700, redirectPage);
});
function redirectPage() {
window.location = linkLocation;
}
});?
Run Code Online (Sandbox Code Playgroud)
当内容在缓存中有效时,这就像一个魅力,但是当一个图像需要加载时,它会暂时出现,然后被隐藏和淡入
所以我需要的是一种方法来隐藏内容,直到它完全加载,只有在它之后让它消失
希望有人可以帮助我,提前谢谢
jquery ×1