One of the two jquery plug-in named "confirm"

Source: Internet
Author: User

Now I will introduce two jquery plug-in, they are confirm and help message. Maybe you will need them in some development situation.

Confirm

1. What is confirm?

You can base on the name, guess what it is?

It include two buttons which is "yes" and "no", you can choose one of the buttons to tell the system what will be do next.

2. Scenarios

If a user need to sign out from the system, then our system shoshould check he or she really want to sign out, so we need confirm plug-in

3. Introduce of confirm

It has five parameters: MSG, this will display in the confirm view.

If you need set the Confirm position you can pass parameters of 'X' and 'y '.

Above all, you also need two function name, to deal with two actions, choosing yes or no.

4. How to Use

First, you need to load jquery frame, beause our confirm plug-in is base on the jquery frame.

Second, you can use the plug-in as other jquery frame, such

$ ("# ID"). Confirm ({"MSG": "Sure? "})

$ (". Class"). Confirm ({"MSG": "Sure? "," Okclick ":" closefunction "," cacelclick ":" cancelfunction "})

5. Try it yourself

I will give a example below, you can use it like this.

<!--//index.html-->

<!--make sure that the confirm.js and jquery-1.6.2.min.js are in the same folder as index.html-->

You can download here, good luck for you

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.