私はウェブサイトを持っており、javascript関数を取得して、Macで空白を作成しないようにしようとしています。この空白は、更新のたびに増加します。
まず、必要なものを svg で作成し、次にそれを JavaScript でトリガー/制御します。次に、Windows ではないかどうかを検出する JavaScript 関数があります。空白をクリアして、Mac と Windows の両方で使用できますか?
何が原因かわからないため、空白の原因となっているコードを投稿していません。
検出コードは次のとおりです。
(function() {
if (navigator.userAgent.match(/webOS X/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/iPod/i)
) {
isApple = true;
if (confirm("Because this is a Apple device, It is not reccommended for you to view this site on this device. You will now be transferred to Google.com. I am working on a fix. Thank you for your patience.")){
window.location = "https://www.google.com";
}else{
alert("It is NOT recommended that you view this site at this time. I am working on a fix. Please leave this site now.")}
};
}
)();
また、isApple が true のときはいつでもフェード機能をキャンセルしたいと思います。フェードコードは次のとおりです。
$(document).ready(function fade(){
window.onload = (function(){
$("#circ1").fadeIn();
$("#circ2").fadeIn("slow");
$("#circ3").fadeIn(800);
$("#circ4").fadeIn(900);
$("#circ5").fadeIn(1000);
$("#circ6").fadeIn(1100);
$("#circ7").fadeIn(1200);
$("#circ8").fadeIn(1250);
$("#circ9").fadeIn(1300);
$("#circ10").fadeIn(1350);
$("#circ11").fadeIn(1400);
$("#circ12").fadeIn(1450);
$("#circ13").fadeIn(1500);
$("#circ14").fadeIn(1550);
$("#circ15").fadeIn(1600);
$("#circ1").fadeOut();
$("#circ2").fadeOut("slow");
$("#circ3").fadeOut(800);
$("#circ4").fadeOut(900);
$("#circ5").fadeOut(1000);
$("#circ6").fadeOut(1100);
$("#circ7").fadeOut(1200);
$("#circ8").fadeOut(1250);
$("#circ9").fadeOut(1300);
$("#circ10").fadeOut(1350);
$("#circ11").fadeOut(1400);
$("#circ12").fadeOut(1450);
$("#circ13").fadeOut(1500);
$("#circ14").fadeOut(1550);
$("#circ15").fadeOut(1600);
});
});
どんな助けでも大歓迎です。