Le: 08 09 2014 à 20:00
Auteur: Aurelio De Rosa
Notifications are one of the most used features when developing a dynamic website. Whether your application is injecting a snippet of HTML in the web page or it's sending the data of a form filled by a user, your application needs to give some feedback to the users. There are a lot of different techniques you can employ to provide feedback to your users such as alert messages and dialog boxes.
In this article, I'll explain how you can integrate nice notifications in your web pages through the use of a jQuery plugin called noty.
What's noty?
noty is a jQuery plugin that makes it easy to create several types of feedback like alerts, success or failure messages, and requests of confirmation. My choice to discuss this plugin is not random. In fact, noty is one of the most watched and starred plugins that you can find on the
jQuery plugin registry. One of the best features of noty is that it's highly customizable thanks to the many options it exposes, some of which will be discussed in this article. Another interesting feature is that it allows you to queue the notifications so that you don't have to wait until the life cycle of a previously showed notification ends. However, if you don't need this feature you can disable it.
Getting Started with noty
Just like many jQuery plugins, it's very easy to start using noty. The first step is to download the plugin and include it in your pages after the jQuery library. To download noty you can either visit
its GitHub repository and download the latest version available, or type the following Bower command:
[code]
bower install noty
[/code]
Once you have downloaded the plugin, you can include it on your page using the following code:
[html]
[/html]
Continue reading %Creating Nice Notifications with jQuery%