Jquery waiting effect example
- 2020-03-30 02:46:24
- OfStack
Implement query wait: query in progress, please wait...
< img SRC = "border = 0 / / files.jb51.net/file_images/article/201405/20140501084831.jpg? 20144185251 ">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> Please wait for a moment ... </title>
<style type="text/css">
.query_hint{
border:5px solid #939393;
width:250px;
height:50px;
line-height:55px;
padding:0 20px;
position:absolute;
left:50%;
margin-left:-140px;
top:50%;
margin-top:-40px;
font-size:15px;
color:#333;
font-weight:bold;
text-align:center;
background-color:#f9f9f9;
}
.query_hint img{position:relative;top:10px;left:-8px;}
</style>
</head>
<body>
<div id="query_hint" class="query_hint">
<img src="http://static.oschina.net/uploads/space/2014/0430/115223_oFLD_1163935_thumb.gif" /> Please wait for a moment ...
</div>
</body>
</html>
Jquery code
<div id="query_hint" class="query_hint">
<img src="http://static.oschina.net/uploads/space/2014/0430/115223_oFLD_1163935_thumb.gif" /> Enquires, please wait a moment...
</div>
<script src="http://www.oschina.net/js/2012/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
//Remove Loading after page Loading
$(document).ready(function(){
parent.frames[0].queryHintCallback("query_hint");
});
function show_query_hint(query_hint){
var query_hint = document.getElementById(query_hint);
query_hint.style.display="block";
}
function queryHintCallback(query_hint){
var query_hint = document.getElementById(query_hint);
query_hint.style.display="none";
}
</script>