zoukankan      html  css  js  c++  java
  • 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"  
         };  


  • 相关阅读:
    node分离路由文件
    node项目搭建步骤
    在express获取POST(类似表单请求)的数据
    10分钟搭建Kubernetes容器集群平台(kubeadm)
    今日考题
    jQuery方法介绍
    JQuery练习题
    今日面试题:
    bom操作,事件与jquery
    今日理解之js
  • 原文地址:https://www.cnblogs.com/louzi/p/10285946.html
Copyright © 2011-2022 走看看