乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      提示對話框

       昵稱34195792 2019-05-21

      spop.js是一款純js toast消息提示通知插件。通過spop.js插件,你可以快速的在網(wǎng)頁上制作出漂亮的toast消息提示效果。該js toast消息提示插件的特點(diǎn)還有:

      • 內(nèi)置4種主題樣式:default, success, warning, error。
      • toast可以顯示在屏幕的6個(gè)位置:top-left, top-center, top-right, bottom-left, bottom-center, bottom-right。
      • 可以對消息提示進(jìn)行編組。
      • 提供打開和關(guān)閉消息提示時(shí)的回調(diào)函數(shù)。
      • 支持HTML內(nèi)容。

      使用方法

      在頁面中引入spop.css和spop.js文件。

      <link rel='stylesheet' type='text/css' href='./css/spop.css'><script type='text/javascript' src='./js/spop.js'></script>
      初始化toast

      該js toast消息提示插件最基本的使用方法如下:

      spop('Default SmallPop');spop('<h4 class='spop-title'>Success</h4>I′m a success SmallPop', 'success');spop('<strong>Warning pop</strong>', 'warning');spop('<strong>Error Here!</strong>', 'error');
      分組

      可以對消息進(jìn)行分組,分組后的消息每次只顯示一條。

      spop({ template: 'All fields are required!', group: 'submit-satus', style: 'error'});spop({ template: 'Your information has been submitted', group: 'submit-satus', style: 'success' autoclose: 2000});
      回調(diào)函數(shù)

      在toast消息提示打開和關(guān)閉時(shí)都可以使用回調(diào)函數(shù)。

      spop({  template: 'Please, close me.',  onOpen: function () {    document.body.style.background = '#fff';  },  onClose: function() {    document.body.style.background = '';    spop({      template: 'Thank you!',      style: 'success',      autoclose: 2000    });  }});                  

      配置參數(shù)

      spop.js消息提示插件的可用配置參數(shù)如下:

      spop({ template : null,// string required. Without it nothing happens! style : 'info',// success, warning or error autoclose : false,// miliseconds position : 'top-right',// top-left top-center bottom-left bottom-center bottom-right icon : true,// or false group : false,// string, add a id reference onOpen : funtion() { }, onClose : funtion() { }});
      • template:消息提示的模板??梢允且粋€(gè)字符串,或這是HTML代碼。
      • style:toast消息提示的主題樣式,可以是info,success, warning 或 error。
      • autoclose:是否自動(dòng)關(guān)閉。
      • position:toast消息提示的位置??梢允牵簍op-right,top-left,top-center,bottom-left,bottom-center或bottom-right。
      • icon:是否顯示圖標(biāo)。
      • group:是否對消息進(jìn)行分組。
      • onOpen:toast消息提示打開時(shí)的回調(diào)函數(shù)。
      • onClose:toast消息提示關(guān)閉時(shí)的回調(diào)函數(shù)。

      Github地址為:https://github.com/silvio-r/spop

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多