
One thing I envy about more advanced programming languages is their heavy use of XML to set the properties of controls. This demo is my attempt to use jQuery’s XML processing capabilities to mimic similar behavior. In particular, this demo will display notifications of various types with some robust customization options all within a nicely formed XML file.
1. Giving our notifications some default styling
The boxes follow a familar color scheme to indicate what type of message it is. You can of course change these criteria in the CSS file, but as you will find later, most of these properties will be available to be changed in the XML notifications file when a new message is created. These are the default styles that are used when no styles are included in the XML notifications file.

2. Initializing the plug-in
After downloading the plug-in you need to reference either the included jQuery library or one of your own, the jQNotifications.js file, and the default styles CSS file
3. Create and customize your notifications in the notifications.xml file
As the following XML indicates, there are four types of notifications you can group your messages into: warnings, successes, cautions, and informations. This gives you 4 default notification styles but each message is fully customizable regardless of what group the notification is placed. Here is a list of properties that can be changed on an individual notification message: custom class name [custom-name], styles [width, font-color, background-color, border-color, background-image, display(none)], the actual message
[/text]
, and which element the notification will appear after [placement]. **The notification will not appear unless the placement element is defined and it must be a valid class or id for an element in your html file. Placement will accept jQuery selectors minus the quotes. For example, .foo works as will .foo, #bar because these are valid jQuery selectors. Additionally, by default the injected notification will have 2 class names that are dependent on where the notification is placed in the XML file. Namely, if the notification is placed in the warnings block, the classes jQN-warning-style and jQN-warning-message-[number] will be added to the notification block. The [number] indicates the number of the notification in the warning block (e.g. the third notification will have the class jQN-warning-message-3). If a custom-name is indicated, in addition to those two classes, an additional class as you defined will be added to the notification block. The display(none) element is useful for AJAX style notifications where an event triggers the notification (e.g. a successful form submit).
4. View and download the Demo
Please click the button to see a demo and also download the plugin.

