The elastic layer control based on jquery extension

Source: Internet
Author: User

Beautiful and super-useful pop-up layer event class JS code, support a variety of dialog boxes, pop-up layer, etc., the pop-up layer can be dragged and dragged smoothly, the browser is well-compatible. Customizable content, headings, widths, buttons, and bindings correspond to the event of a simple and convenient implementation of the elastic layer, to add data or display detailed information and other functions.

Follow my steps below.

(1) Prepare the content to be displayed, which is not just the content, it can also be HTML code

(2) After preparing the content, remember to give it a loud title, clear the subject, of course, you can not need

(3) Do you feel that sometimes it is not necessary to identify and cancel these two guys, and if you don't use them, you can abandon them, not fill them out.

is not very simple, still waiting for what, come and try it!!

The effect is as follows:


The following is an example tutorial:

Popupdiv (Options)

Contents

    • Popupdiv (Options)
      1. Id
      2. Title
      3. Width
      4. Height
      5. Content
      6. Ckbtntext
      7. Normaltext
      8. Readyfn
      9. Okfn
      10. Closefn
      11. Closemainfn
ID

The ID of the bomb layer

title

The title of the bomb layer

width

The width of the elastic layer

Height

Height of the projectile layer

content

The content of the projectile layer

Ckbtntext

Confirm Button text content

Normaltext

Cancel Button text content

readyfn ()

Subsequent actions performed after the popup layer

Example:

var pd_detail = new Popupdiv ({
Title: "Caption",
width:400,
Okbtntext: "OK",
Normaltext: "No",
Content: "Contents",
Readyfn:function () {
Alert ("Follow-up actions performed after the popup layer");
}
});

Display effect:


OKFN ()

Determining Callback Events

Example:

var pd_detail = new Popupdiv ({
Title: "Caption",
width:400,
Okbtntext: "OK",
Normaltext: "No",
Content: "Contents",
Okfn:function () {
Alert ("OK callback event");
}
});

Display effect:


Closefn ()

Click No for subsequent actions

Example:

var pd_detail = new Popupdiv ({
Title: "Caption",
width:400,
Okbtntext: "OK",
Normaltext: "No",
Content: "Contents",
Closefn:function () {
Alert ("Click to no Follow up");
}
});

Display effect:


CLOSEMAINFN ()

Follow-up operation after closing the projectile layer

Example:

var pd_detail = new Popupdiv ({
Title: "Caption",
width:400,
Okbtntext: "OK",
Normaltext: "No",
Content: "Contents",
Closemainfn:function () {
Alert ("Follow-up operation after the shell is closed");
}
});

Display effect:


Example:

var pd_detail = new Popupdiv ();

Display effect:


Example:

var pd_detail = new Popupdiv ({
Title: "",
Okbtntext: "",
Normaltext: "",
Content: "",
});

Display effect:


JavaScript Layer Control

Http://www.tiaoceng.com/assemblydetail_34.html

The elastic layer control based on jquery extension

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.