jquery Message Tip plugin TOASTR usage details

Source: Internet
Author: User

Toastr is a simple, beautiful message tip plugin based on jquery, simple and convenient to use, and can automatically disappear according to the set time-out.

1, the use is very simple, the first choice to introduce Toastr JS, CSS files

Html

<script src="<%=path%>/res/toastr/toastr.min.js"></script><link rel="stylesheet " href="<%=path%>/res/toastr/toastr.min.css ">

2. Effect


3. Integrated use
1 //general message hint, default background is light blueToastr.info ("you've got new news!");
2 //success message hint, default background is light greenToastr.success ("you've got new news!");
3 //warning message hint, the default background is orangeToastr.warning ("you've got new news!");
4 //error message hint, default background is light redToastr.error ("you've got new news!");
5 //a message box with a captionToastr.success ("you've got new news!","message Prompt");
6 //Another method of callingtoastr["Info"]("you've got new news!","message Prompt");
4. Custom Usage

Different effects can be achieved by setting custom parameters

Custom parameters:
Javascript

1Toastr.options = {  2CloseButton:false,  3Debugfalse,  4ProgressBar:true,  5Positionclass:"Toast-bottom-center",  6OnClickNULL,  7Showduration:" -",  8Hideduration:" +",  9TimeOut:" -",  TenExtendedTimeout:" +",   OneShoweasing:"Swing",   AHideeasing:"Linear",   -Showmethod:"FadeIn",   -Hidemethod:"FadeOut"   the};

Parameter description:
Closebutton:false, whether to show the Close button (the upper right corner of the Cue box Close button);
Debug:false, whether for debugging;
Progressbar:false, whether to display the progress bar (set the closing time-out progress bar);
Positionclass, where the message box appears on the page

1 toast-top-  left top 2 toast-top-    right Top 3 toast-top-  Center  Top center 4 toast-top-full-widthtop, Width covered full screen 5 toast-botton-right   6 toast-bottom-left7 toast-bottom-Center8 Toast-bottom-full-width

1 onclick, click the message box to customize the event2Showduration: " -", Show action time3Hideduration: " +", Hide action time4TimeOut: " -", auto-off time-out5ExtendedTimeout: " +"6 showeasing: "Swing",7 hideeasing: "Linear",8 showmethod: "FadeIn" is displayed in the same way as jquery9Hidemethod: "FadeOut" hides the same way as jquery

jquery Message Tip plugin TOASTR usage details

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.