• Stars
    star
    572
  • Rank 77,995 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

jGrowl is an unobtrusive notification system for web applications. Want to see it in action? Find out how:...

jGrowl

jGrowl is a jQuery plugin that raises unobtrusive messages within the browser, similar to the way that OS X's Growl Framework works. The idea is simple, deliver notifications to the end user in a noticeable way that doesn't obstruct the work flow and yet keeps the user informed.

Installation

jGrowl can be added to your project using package managers like bower and npm or directly into your html using cdnjs, as well as the good old fashioned copy-paste into your project directory.

Use cdnjs:

<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.4.8/jquery.jgrowl.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.4.8/jquery.jgrowl.min.js"></script>

Install with npm

npm install jgrowl
// Sample 1
$.jGrowl("Hello world!");
// Sample 2
$.jGrowl("Stick this!", { sticky: true });
// Sample 3
$.jGrowl("A message with a header", { header: 'Important' });
// Sample 4
$.jGrowl("A message that will live a little longer.", { life: 10000 });
// Sample 5
$.jGrowl("A message with a beforeOpen callback and a different opening animation.", {
	beforeClose: function(e,m) {
		alert('About to close this notification!');
	},
	animateOpen: {
		height: 'show'
	}
});

Configuration Options

Option Default Description
pool 0 Limit the number of messages appearing at a given time to the number in the pool.
header empty Optional header to prefix the message, this is often helpful for associating messages to each other.
group empty A css class to be applied to notifications when they are created, useful for 'grouping' notifications by a css selector.
sticky false When set to true a message will stick to the screen until it is intentionally closed by the user.
position top-right Designates a class which is applied to the jGrowl container and controls its position on the screen. By Default there are five options available, top-left, top-right, bottom-left, bottom-right, center. This must be changed in the defaults before the startup method is called.
appendTo body The element where our jGrowl messages are appended to. The default is body but feel free to define another one.
glue after Designates whether a jGrowl notification should be appended to the container after all notifications, or whether it should be prepended to the container before all notifications. Options are after or before.
theme default A CSS class designating custom styling for this particular message, intended for use with jQuery UI.
themeState highlight A CSS class designating custom styling for this particular message and its state, intended for use with jQuery UI.
corners 10px If the corners jQuery plugin is include this option specifies the curvature radius to be used for the notifications as they are created.
check 250 The frequency that jGrowl should check for messages to be scrubbed from the screen.This must be changed in the defaults before the startup method is called.
life 3000 The lifespan of a non-sticky message on the screen.
closeDuration normal The animation speed used to close a notification.
openDuration normal The animation speed used to open a notification.
easing swing The easing method to be used with the animation for opening and closing a notification.
closer true Whether or not the close-all button should be used when more then one notification appears on the screen. Optionally this property can be set to a function which will be used as a callback when the close all button is clicked. This must be changed in the defaults before the startup method is called.
closeTemplate Γ— This content is used for the individual notification close links that are added to the corner of a notification. This must be changed in the defaults before the startup method is called.
closerTemplate <div>[ close all ]</div> This content is used for the close-all link that is added to the bottom of a jGrowl container when it contains more than one notification. This must be changed in the defaults before the startup method is called.
log function(e,m,o) {} Callback to be used before anything is done with the notification. This is intended to be used if the user would like to have some type of logging mechanism for all notifications passed to jGrowl. This callback receives the notification's DOM context, the notification's message and its option object.
beforeOpen function(e,m,o) {} Callback to be used before a new notification is opened. This callback receives the notification's DOM context, the notification's message and its option object.
afterOpen function(e,m,o) {} Callback to be used after a new notification is opened. This callback receives the notification's DOM context, the notification's message and its option object.
open function(e,m,o) {} Callback to be used when a new notification is opened. This callback receives the notification's DOM context, the notifications message and its option object.
beforeClose function(e,m,o) {} Callback to be used before a new notification is closed. This callback receives the notification's DOM context, the notification's message and its option object.
close function(e,m,o) {} Callback to be used when a new notification is closed. This callback receives the notification's DOM context, the notification's message and its option object.
click function(e,m,o) {} Callback to be used when a notification is clicked. This callback receives the notification's DOM context, the notification's message and its option object.
animateOpen { opacity: 'show' } The animation properties to use when opening a new notification (default to fadeOut).
animateClose { opacity: 'hide' } The animation properties to use when closing a new notification (defaults to fadeIn).

More Repositories

1

rest-bundle

This bundle provides REST endpoints for Doctrine entities.
PHP
123
star
2

react-pouchdb

React components for interacting with PouchDB.
TypeScript
14
star
3

aura-micro

Aura Microframework wrapper paralleling the Silex API, sort of
PHP
13
star
4

kafka-connect-salesforce

UNMAINTAINED - Kafka Connect connector for reading data in real time from salesforce.com
Java
11
star
5

lectionary

The Lutheran Lectionary Project provides an abstracted mechanism for developing lectionary algorithims for calculating a given Sunday of the church year.
PHP
8
star
6

salesforce-explorer

An electron app for navigating Salesforce metadata
JavaScript
7
star
7

lectionary-js

This is a library for calculating weeks of the Western Christian church calendar. This Christian calendar is often referred to as the liturgical year and each Sunday in it has an associated set readings called pericopes. These pericopes and prayers that go with them are often called propers and together make up the lectionary.
JavaScript
7
star
8

ruler-reader

Multi format reader utility for the Ruler library
PHP
5
star
9

react-couchdb-authentication

React component for authenticating against a CouchDB user db and syncing it locally with PouchDB.
TypeScript
5
star
10

couchdb-userdb

A tool for monitoring changes to the users document in CouchDB can creating per user databases.
JavaScript
4
star
11

javascript

This repository contains things I'm working on and things I like to reuse.
TypeScript
4
star
12

rest-demo-app

Demo app using the LemonRestBundle
JavaScript
3
star
13

example-relay-app

An example using react, react and postgraphile that queries and mutates data with graphql.
JavaScript
2
star
14

simple-container

Simple service container with dependency injection
PHP
2
star
15

blueprint-taskmanager

My react playground, where I happen to be building yet another task manager
JavaScript
2
star
16

example-app

An example react app using my pouchdb and form components.
TypeScript
1
star
17

dream-stream

Code for the Dreamforce 2015 session: Integrating High-Velocity Data in Your Salesforce Application
JavaScript
1
star
18

SwiftUIExamples

Swift
1
star