公告:魔扣目录网为广大站长提供免费收录网站服务,提交前请做好本站友链:【 网站目录:https://www.morko.net 】, 免友链快审服务(50元/站),

点击这里在线咨询客服
新站提交
  • 网站:51998
  • 待审:31
  • 小程序:12
  • 文章:1030137
  • 会员:747

jQuery消息提示插件growl-notification,该插件提供漂亮的UI效果,和多种主题,支持自定义消息框的弹出位置等,使用简单方便。

内置漂亮的 UI 效果和多种主题、

轻量级,压缩后只有 18K。

纯 js 编写,没有任何依赖。

支持 IE11+, Safari, Google Chrome, Yandex Browser, Opera, Firefox。

jQuery消息提示插件growl-notification

使用方法

在页面中引入下面的文件。

<link href="light-theme.min.css" rel="stylesheet">
<script src='growl-notification.min.js'></script>

初始化插件

GrowlNotification.notify({
    title: 'This is title',
    description: 'My Description'
});

配置参数

GrowlNotification.notify({
    margin: 20,
    type: 'default',
    title: '',
    description: '',
    image: {
        visible: false,
        customImage: ''
    },
    closeTimeout: 0,
    closeWith: ['click', 'button'],
    animation: {
        open: 'slide-in',
        close: 'slide-out'
    },
    animationDuration: .2,
    position: 'top-right',
    showBorder: false,
    showButtons: false,
    buttons: {
        action: {
            text: 'Ok',
            callback: function() {}
        },
        cancel: {
            text: 'Cancel',
            callback: function() {}
        }
    },
    showProgress: false
});


参数默认值描述
width: number|stringnull消息通知框的宽度,例如 100px, 50%...
zIndex: number1056消息通知框的 z-index
type: string'alert'alert, success, error, warning, info
position: string'top-right'top-left, top-right, bottom-left, bottom-right, top-center, bottom-center
title: string''标题,可以包括 HTML 内容(input 元素除外)
description: string''描述,可以包括 HTML 内容(input 元素除外)
image.visible: booleanfalse显示隐藏图片
image.customImage: string''自定义图片的路径
closeTimeout: boolean,intfalse延迟关闭对话框的时间,单位毫秒。
closeWith: [...string]['click']click, button
animation.open: string,null,false'slide-in'如果是 string, 表示使用 css 类名. 如果是false|null|'none', 不会使用动画效果。 'slide-in', 'fade-in'
animation.close: string,null,false'slide-out'I 如果string,表示使用 css 类名. 如果是 false|null|'none',不会使用动画效果。 'slide-out', 'fade-out'
showButtons: true,falsefalse显示或隐藏按钮。
buttons: object
buttons: {
    action: {
        text: 'Ok',
        callback: function {} // callback
    },
    cancel: {
        text: 'Cancel',
        callback: function {} // callback
    }
}
Buttons configuration
showProgress: true,falsefalse显示或隐藏进度条
GrowlNotification.setGlobalOptions: object{}为消息框设置全局参数。
GrowlNotification.closeAll-关闭所有消息框。


分享到:
标签:jQuery插件 消息提示插件 growl-notification插件
用户无头像

网友整理

注册时间:

网站:5 个   小程序:0 个  文章:12 篇

  • 51998

    网站

  • 12

    小程序

  • 1030137

    文章

  • 747

    会员

赶快注册账号,推广您的网站吧!
最新入驻小程序

数独大挑战2018-06-03

数独一种数学游戏,玩家需要根据9

答题星2018-06-03

您可以通过答题星轻松地创建试卷

全阶人生考试2018-06-03

各种考试题,题库,初中,高中,大学四六

运动步数有氧达人2018-06-03

记录运动步数,积累氧气值。还可偷

每日养生app2018-06-03

每日养生,天天健康

体育训练成绩评定2018-06-03

通用课目体育训练成绩评定