Jquery.loadmask.js

Source: Internet
Author: User
Tags time in milliseconds

Quick Start

The directory structure after download is as follows:

Using this plugin is straightforward, as shown in the following steps:

1, reference jquery,1.2.3 above version

<script type= "Text/javascript" src= "Jquery-1.7.1.js" ></script>

2, reference Jquery.loadmask.css, Jquery.loadmask.js (or min version jquery.loadmask.min.js)

<link href= "Jquery.loadmask.css" rel= "stylesheet" type= "text/css"/><script type= ' text/javascript ' src= ' Jquery.loadmask.min.js ' ></script>

3. Call the Mask (Label,delay) method to mask the DOM element.

$ ("#myDiv"). Mask (); $ ("#myDiv"). Mask ("Loading ..."); $ ("#myDiv"). Mask ("Loading ...", 500);

4. Call the Unmask () method to unblock.

$ ("#myDiv"). unmask ();

5. Call the Ismasked () method to determine if a DOM element is masked.

if ($ ("#myDiv"). ismasked ()) {$ ("#myDiv"). unmask ();
Method Mask ([Label] [, Delay])

Displays the load shield on the selected DOM element, supporting one or more selectors.

Defined
$.fn.mask = function (label, delay) {...}
Parameters

Label

A text string, displayed at the outermost loading prompt (on the edge of the wait picture), if this parameter value is undefined, only a shield with no wait icon and text hint is displayed;



=undefined

Delay

The time in milliseconds to delay the display, and if the unmask () method is not yet called to the delay time, then nothing will happen, that is, the display is no longer shaded.

Case
$ ("#myDiv"). Mask (); $ ("#myDiv"). Mask ("Loading ..."); $ ("#myDiv"). Mask ("Loading ...", 500);
Unmask ()

Removes the Shield layer on the DOM element, which supports one or more selector;

Defined
$.fn.unmask = function () {...}
Parameters

No

Case
$ ("#myDiv"). unmask ();
Ismasked ()

Checks if there is a shield on a DOM element, returns False if no shield or shield delay is displayed, otherwise returns true;

Defined
$.fn.ismasked = function () {...}
Parameters

No

Case
if ($ ("#myDiv"). ismasked ()) {$ ("#myDiv"). unmask ();

Jquery.loadmask.js

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.