GitHub

jQuery Notify is a jQuery plugin that easily displays html notifications.

Please visit www.vicreative.nl for full documentation.

Install

npm install jquery-notifier

Usage

import "jquery-notifier";

scss

import "jquery-notifier/src/notify.scss";

css

import "jquery-notifier/lib/notify.css";

The notify plugin makes displaying notifications easy.
Every notification will be visible for a configurable time, but can also be made sticky.
Every notification container element has its own queue of notification messages. The position of the notification messages are automatically updated when a notification message is added or removed.
The notification can also contain HTML.
By default, the notify plugin contains 4 types:

  • info, the default notification, visible for 3 seconds.
  • success, a sticky notifcation for success messages.
  • error, a sticky notification for error messages.
  • warning, a sticky notification for warnings.

The configuration of these types can be customized and custom types can be added. The rendering of these types is customizable.
By default. there are 2 styles:

  • bar, a full width bar
  • box, a box positioned on the right of the window

Custom styles can be added.

Helpers

$.notify.create

The $.notify.create function creates and returns a text based notification. This function has two arguments, the text for the notification and the notifcation options. The last argument is optional.

var notification = $.notify.create("some notification text", { /* configuration options */ });

Type Configuration

All types can be configured and all have a default configuration set.
The default configuration set can also be changed. The $.notify.settings object holds the configuration for all types.
The name of the type is the key of the object. When no type is set, the settings for the type info (

Read the original on github.com ↗