toastr消息弹出插件

git下载地址:https://github.com/CodeSeven/toastr

 <link href="toastr.css" rel="stylesheet"/>

<script src="toastr.js"></script> 引入

示例:

// Display a warning toast, with no title
toastr.warning('My name is Inigo Montoya. You killed my father, prepare to die!')

// Display a success toast, with a title
toastr.success('Have fun storming the castle!', 'Miracle Max Says')

// Display an error toast, with a title
toastr.error('I do not think that word means what you think it means.', 'Inconceivable!')

// Immediately remove current toasts without using animation
toastr.remove()

// Remove current toasts using animation
toastr.clear()

// Override global options
toastr.success('We do have the Kapua suite available.', 'Turtle Bay Resort', {timeOut: 5000})

全局配置参数:
 toastr.options = {  
          closeButton: false,  
          debug: false,  
          progressBar: true,  
          positionClass: "toast-bottom-center",  
          onclick: null,  
          showDuration: "300",  
          hideDuration: "1000",  
          timeOut: "2000",  
          extendedTimeOut: "1000",  
          showEasing: "swing",  
          hideEasing: "linear",  
          showMethod: "fadeIn",  
          hideMethod: "fadeOut"  
     };  

 



posted @ 2019-01-18 09:23  篓子  阅读(394)  评论(0编辑  收藏  举报