我希望点击按钮提交后有一个加载图标。我在所有浏览器中都能很好地运行代码...在Safari中更少。我已经读过点击功能在safari中不起作用,但我很难找到有用的东西。我能做些什么不同的事情?感谢
----------CSS------------
#loading {
width: 100%;
height: 100%;
top: 0px;
left: 0px;
position: fixed;
display: block;
opacity: .9;
background-color: #000;
z-index: 99;
text-align: center;
}
#loading-image {
position: absolute;
top: 250px;
z-index: 600;
width: 100%;
text-align: center;
}
#loading-paragraph {
position: absolute;
top: 180px;
z-index: 600;
width: 100%;
text-align: center;
color: #f2f2f2;
}
-----------SCRIPT---------------
$(document).ready(function(){
$('#loading').hide();
$('#button-upload').click(function() {
$('#loading').show();
});
});
-----------HTML-------------------
<div id="loading">
<p id="loading-paragraph">Loading</p>
<p id="loading-image"><img src="imagens/ajax-loader.gif" alt="Loading..."/></p>
</div>
<form action="" method="POST">
<button type="submit" name="submit" class="button" id="button-upload">Send info</button>
</form>