# notify **Repository Path**: mirrors_karrick/notify ## Basic Information - **Project Name**: notify - **Description**: JavaScript library for managing notifications - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2026-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # notify.js Notify is a JavaScript library for managing notifications in a web application. It has a clean API. It requires [jQuery](http://jquery.com), [jQuery UI](http://jqueryui.com/), and [Bootstrap](http://getbootstrap.com/javascript/). ## Simple Example: ```JavaScript // instantiate the notify manager var notify = new Notify(); // create some notes notify.success({caption:"notify.js", message:"has an easy-to-use api"}); notify.success({caption:"some notes automatically fadeout",message:"this one after 5 seconds", messageFadeout:5000}); notify.info({caption:"some notes just have a caption"}); notify.warning({message:"some notes just have a message"}); notify.danger({caption:"but when you have both", message:"captions are bold and messages are regular fonts"}); ``` ## Complex Example: This example demonstrates a mini library for wrapping AJAX calls. When the call completes, the note is removed. If the call resulted in an error, however, the note is replaced by a new note informing the user of the error message. ```JavaScript // instantiate the notify manager var notify = new Notify(); // invoke .success, .info, .warning, and .danger methods on the notification object: var getJsonWithStatus = function(message, uri, data, fn){ var note = notify.info({message: message}); return $.getJSON(uri, data) .done(function(results){ if(fn !== undefined){ fn(results); } }) .fail(function(jqXHR, textStatus, errorThrown){ var msg = errorThrown || textStatus; notify.danger({caption: message, message: msg, messageFadeout: errorMessageTimeout}); }) .always(function(){ note.remove(); }); }; ``` ## Setup Include jQuery, jQuery UI, Bootstrap, and notify.js in your HTML file. ```HTML