0
jQueryを使用して私のサイト全体にページをフェードアウト(スムーズな移行のため)しています。私は別のスタック交換の質問(下記参照)で概説されたコードを使用しています。デスクトップ上のすべてのブラウザでうまく動作します。しかし、モバイルサファリには、わからないバグがあります。戻るボタンをクリックすると、何も表示されず、空の白い画面になります。コンテンツを表示するには、それを再読み込みする必要があります。誰がここで何が起こっているのか知っていますか?jQueryフェードアウトページモバイルのバグ
// delegate all clicks on "a" tag (links)
$(document).on("click", "a", function() {
// get the href attribute
var newUrl = $(this).attr("href");
// veryfy if the new url exists or is a hash
if (!newUrl || newUrl[0] === "#") {
// set that hash
location.hash = newUrl;
return;
}
// now, fadeout the html (whole page)
$("html").fadeOut(function() {
// when the animation is complete, set the new location
location = newUrl;
});
// prevent the default browser behavior.
return false;
});