Example of jquery wait Effect

Source: Internet
Author: User

Query wait: the query is in progress. Please wait...

Copy codeThe Code is as follows:
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN" "http://www.w3.org/TR/html4/loose.dtd">
<Html>
<Head>
<Title> query in progress. Please wait... </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">
querying, please wait...
</Div>
</Body>
</Html>

Jquery code

Copy codeThe Code is as follows:
<Div id = "query_hint" class = "query_hint">
querying, please wait...
</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 ");
});

/**
* @ Description * display the query wait Layer
* @ Param query_hint
*/
Function show_query_hint (query_hint ){
Var query_hint = document. getElementById (query_hint );
Query_hint.style.display = "block ";
}

/**
* @ Description Query Result callback function
* @ Param query_hint indicates the id of the prompt layer to be hidden.
*/
Function queryHintCallback (query_hint ){
Var query_hint = document. getElementById (query_hint );
Query_hint.style.display = "none ";
}
</Script>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.