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.
Relevant documents to the official website to download
1. Introduction of Toastr JS and CSS files
1 <link href= "/toastr/build/toastr.css" rel= "stylesheet" >2 <script src= "/toastr/build/ Toastr.min.js "></script>
2, Initialize TOASTR (here is Custom)
Toastr.options ={closeButton:false,//whether the Close button is displayed (the upper right corner of the Cue box Close button) Debug:false,//whether for debugging; ProgressBar:true,//whether to display the progress bar (set the closing time-out progress bar) Positionclass:"Toast-bottom-center",//message box in the location of the page display onclick:NULL,//Click message box to customize event showduration:"300",//Show Action time Hideduration:"1000",//Hide action time TimeOut:"2000",//auto-off time-out extendedtimeout:"1000", showeasing:"Swing", hideeasing:"Linear", Showmethod:"FadeIn",//Show the way Hidemethod:"FadeOut"//Hide the way};
// general message hint, default background is light blue Toastr.info ("You've got new news!") ); // toastr.success ("You've got new news!") ); // toastr.warning ("You've got new news!") ); // Toastr.error ("You've got new news!") ); // message box with caption toastr.success ("You have a new message!", "message Prompt"); // another way to call toastr["info"] ("You have new messages!", "message Prompt");
jquery message hint plugin toastr use