MsgAlert - MadeByAmp

MsgAlert is a clean CSS3 notification system for alerting users to site information, errors, warnings, and successes.

To get started with MsgAlert, add the msgAlert.css stylesheet to your document:

<link rel="stylesheet" href="msgAlert.css" type="text/css" charset="utf-8" />

Also add the MsgAlert javascript file to your document:

<script src="msgAlert.js"></script>

Then add the images folder contained in this download to your project and make sure all the image paths in the msgAlert.css file are correct.


For support email the author through his Code Canyon author page http://codecanyon.net/user/MadeByAmp





Example/Usage

Basic

$.msgAlert ({
	text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.'
});



Basic w/ Header

$.msgAlert ({
	title: 'Title'
	, text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.'
});



Types

$.msgAlert ({
	type: 'info'
	, title: 'Title'
	, text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.'
});



Callback

$.msgAlert ({
	type: 'error'
	, title: 'Title'
	, text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.'
	, callback: function () {
		alert ('Alert Callback');
	}
});





Options

Option Name Default Value Explanation
type empty string Designates the type of notication being displayed. Options are an empty string, info, success, error, warning.
title empty string Optional title which is displayed above the notification text.
text empty string Required text message for notification.
closeTrigger true True/false. When set to true the notification will display a small x in the corner allowing the user to manually close the notification.
escClose true True/false. When set to true the notification will be closed when the user clicks the ESC key.
overlay true True/false. When set to true a the content of the page will be covered by a transparent div halting interaction until the alert is closed.
overlayClose true True/false. When set to true clicking on an active overlay will close the alert.
callback function () {} Callback function to be executed when an affirmative button is clicked.