The message plugin based on jquery implements the pop-up messages box in the lower-right corner _jquery

Source: Internet
Author: User
Tags set time

1.$.messager.lays (width, height);

This method is used primarily to define the width and height of the pop-up window.

2.$.messager.anim (Type,speed);

The method primarily defines how and how quickly the window is rendered.

$.messager.anim ("Fade", 1000); Display as Fadein animation

$.messager.anim ("show", 1000); Show in animated mode

3.$.messager.show (Title,text,time);

This method primarily defines what the window displays, and how long the window is displayed to hide it.

If you use the default caption, the title is set to 0, and the title and text can also be set to display for HTML content. If you want the user to click the Close button on the window to close the message box, set time to 0.

$.messager.show (0, "This is a cue box", 5000);

$.messager.show ("<font color= ' red ' > Hint info </font>", "<a href= ' http://www.cnblogs.com ' > Blog Park welcome you </a > ", 3000);

After understanding the role of each method in the message plug-in, it is easy to use, the following actions:

1. Introduce jquery.js and jquery.messager.js files to the page.

2. Call the function in the message plug-in when the page is loaded, set the window size, display the effect, and display the contents.

Copy Code code as follows:

$ (function () {
$.messager.lays (200, 200);
$.messager.anim (' fade ', 1000);
$.messager.show ("Hint info", "<a href= ' http://www.jb51.net ' > Yun-Habitat Community </a>", 5000);
});

3. The final display of the effect is shown below.

Online Demo Address http://demo.jb51.net/js/jquery.messager/index.html
Plugin Download: jquery.message.js package Download Address http://www.jb51.net/jiaoben/22351.html

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.