Project Description
JNotify is a JQuery Plugin, based on JQuery UI, to create notification messages and status bars.

Usage:

$(document).ready(function() {

    // For jNotify Inizialization
    // Parameter:
    // oneAtTime : true if you want show only one message for time
    // appendType: 'prepend' if you want to add message on the top of stack, 'append' otherwise
    $('#StatusBar').jnotifyInizialize({
        oneAtTime: true
    })
    $('#Notification')
        .jnotifyInizialize({
            oneAtTime: false,
            appendType: 'append'
        })
        .css({ 'position': 'absolute',
            'marginTop': '20px',
            'right': '20px',
            'width': '250px',
            'z-index': '9999'
        });
    // --------------------------------------------------------------------------

    // For add a notification on button click
    // Parameter:
    // text: Html do you want to show
    // type: 'message' or 'error'
    // permanent: True if you want to make a message permanent
    // disappearTime: Time spent before closing message
    $('#addStatusBarMessage').click(function() {
        $('#StatusBar').jnotifyAddMessage({
            text: 'This is a non permanent message.',
            permanent: false,
            showIcon: false
        });
    });

    $('#addStatusBarError').click(function() {
        $('#StatusBar').jnotifyAddMessage({
            text: 'This is a permanent error.',
            permanent: true,
            type: 'error'
        });
    });

    $('#addNotificationMessage').click(function() {
        $('#Notification').jnotifyAddMessage({
            text: 'This is a non permanent message.',
            permanent: false
        });
    });

    $('#addNotificationError').click(function() {
        $('#Notification').jnotifyAddMessage({
            text: 'This is a permanent error.',
            permanent: true,
            type: 'error'
        });
    });
    // -----------------------------------------------------
});

Fabio Franzini
http://www.fabiofranzini.com

Last edited May 13, 2011 at 11:56 AM by FabioFranzini, version 9