CSS maker Cue box ' loading please .... ' Example tutorial

Source: Internet
Author: User
Recently do the project encountered such a demand, page load data is slow, has not responded, the following small series to everyone brought to you based on the CSS Production prompt box ' is loading please .... ' function, need a friend to refer to it

Demand:

Sometimes the load data is slow, the page has not responded, the user may be constantly brushing, and the user experience is not good

Solve:

Add the following code to JS


Hint Information  function addrunningp () {      $ ("<p class=\" Datagrid-mask\ "></p>"). CSS ({display: "Block", Width: "100%", Height: $ (document). Height ()}). AppendTo ("body");      $ ("<p class=\" datagrid-mask-msg\ "></p>"). HTML ("Processing, please wait patiently ..."). AppendTo ("Body"). CSS ({display: "Block ", Left: ($ (document.body). Outerwidth (True)-2, Top: ($ (document). Height ()-2});  }  Suppress the message  function Moverunningp () {      $ ("p[class= ' Datagrid-mask ')"). Remove ();      $ ("p[class= ' datagrid-mask-msg ']"). Remove ();  

Can be called where needed.

The effect is as follows: The entire page is not editable

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.