在网站上加载我的主页之前,我试图制作一个初始屏幕。但是我的启动画面jquery代码可以在chrome或其他浏览器上运行,但是不能在safari上运行。在Safari浏览器的启动画面上显示但不起作用,单击功能隐藏启动画面并显示主页。请帮助我任何人尽快解决我的问题。
这里提供了一个链接,您可以在这里查看我的网站。所有浏览器。 http://mwancloud.com/mw-najeeb-work/chupper_kulture/home.html
<div class="top-img"></div>
<div class="down-img"></div>
<div class="img-clickable" onclick="play();">
</div>
<audio id="audio" src="http://chopper-kulture.mwancloud.com/wp-content/themes/chopper-kulture1/audio/door_knob.wav"></audio>
<audio id="audio" src="http://chopper-kulture.mwancloud.com/wp-content/themes/chopper-kulture1/images/door_creak_closing.wav">
</audio>
<script type="text/javascript">
// function cookiesSET(){
var url = window.location.href;
if (url == "http://mwancloud.com/mw-najeeb-work/chupper_kulture/home.html") {
jQuery(function() {
var COOKIE_NAME = 'landing-page-cookie';
$go = jQuery.cookie(COOKIE_NAME);
//alert("we are creating cokkie");
if ($go == null && $(window).width() > 768) {
var total_height = $(document).height();
var total_width = $(document).width();
var half_width = total_width / 2;
var height = total_height / 2;
var imgTop = 208;
var img_half = 266.5;
var top = height - imgTop;
var left = half_width - img_half;
//jQuery(".main-container").css("opacity", "0");
// jQuery(".specific-row").css("opacity", "0");
jQuery('.main-container').css('background-image', 'none');
jQuery('.container-fluid').css('display', 'none');
//jQuery("body").css("background", "#000");
$('.top-img').html('<img alt="" src="http://chopper-kulture.mwancloud.com/wp-content/themes/chopper-kulture/images/wood-vertical1.jpg" class="img-top fanimation slideInDown" data-fanimation-delay="0.1s">');
$('.down-img').html('<img alt="" src="http://chopper-kulture.mwancloud.com/wp-content/themes/chopper-kulture/images/wood-vertical1.jpg" class=" img-down fanimation slideInUp" data-fanimation-delay="0.1s">');
$('.img-clickable').html('<img alt="" src="http://chopper-kulture.mwancloud.com/wp-content/themes/chopper-kulture/images/CK_main-logo_b.png" class="clickable-img fanimation bounceIn" data-fanimation-delay="0.1s" >');
$(".top-img img").css('height', height);
$(".down-img img").css('height', height);
$(".top-img img").css({
"position": "absolute",
"top": "0"
});
$(".down-img img").css({
"position": "absolute",
"top": height
});
$(".clickable-img").css({
"position": "absolute",
"top": top
});
$(".clickable-img").css({
"position": "absolute",
"left": left
});
} else if ($(window).width() < 768) {
http: //chopper-kulture.mwancloud.com/wp-content/uploads/wow-slider-plugin/3/style.css
var date = new Date();
var minutes = 1;
date.setTime(date.getTime() + (minutes * 60 * 1000));
date.setDate(date.getDate() + 1);
jQuery.cookie(COOKIE_NAME, 'test', {
expires: date,
path: '/'
});
jQuery(".main-container").css("display", "block");
}
else {
//console.log('cookie already created');
hide_landing_page_stuff();
}
});
}
// }
else {
jQuery(".main-container .specific-row").css("opacity", "1");
}
jQuery(document).ready(function() {
jQuery(".clickable-img").click(function() {
play_voice();
jQuery(".img-top").stop();
jQuery(".img-down").stop();
jQuery(".img-top").animate({
top: '-400px'
}, 2000);
jQuery(".img-down").animate({
top: '1000px'
}, 3000);
function explode() {
jQuery(".main-container").css("display", "block");
hide_landing_page_stuff();
}
setTimeout(explode, 3000);
var COOKIE_NAME = 'landing-page-cookie';
$go = jQuery.cookie(COOKIE_NAME);
//alert("working");
console.log('we are creating cokkie');
var date = new Date();
var minutes = 1;
date.setTime(date.getTime() + (minutes * 60 * 1000));
date.setDate(date.getDate() + 1);
jQuery.cookie(COOKIE_NAME, 'test', {
expires: date,
path: '/'
});
});
});
</script>