Online example
Example Demo
How to use
- <button Type="button" class="btn btn-primary" id="Showtoast "> display </button>
Copy
- Toastr. Info(' I'm just a hint message ')
CopyParameter description
- $(function() {
- ///parameter settings, if the default value can be omitted to the following generation
- Toastr. Options = {
- "CloseButton": false, //Whether the Close button is displayed
- "Debug": false, //whether to use Debug mode
- "Positionclass": location of "Toast-top-full-width",//pop-up window
- "Showduration": "+",//animation time displayed
- "Hideduration": "+",//Lost animation time
- "TimeOut": "The", //Show time
- " extendedtimeout": "+",//Extended display time
- "Showeasing": "Swing",//animation buffering mode at display
- "Hideeasing": "linear",//animation buffering mode when disappearing
- "Showmethod": "FadeIn",//Animation mode on display
- "Hidemethod": animation mode when "FadeOut"//Disappears
- };
- //Successful prompt binding
- $("#success"). Click(function() {
- Toastr. Success("Congratulations on your Success");
- })
- //Information hint binding
- $("#info"). Click(function() {
- Toastr. Info("This is a hint message");
- })
- //WARNING hint binding
- $("#warning"). Click(function() {
- Toastr. Warning("warn you not to bother me");
- })
- //Wrong language hint binding
- $("#error"). Click(function() {
- Toastr. Error("errors, please change");
- })
- //Clear window bindings
- $("#clear"). Click(function() {
- Toastr. Clear();
- })
- })
Copy
Download
TOASTR Customization Tips