I ve always liked the Facebook’s Alert Notifications. They look very simple and decent. And I always wanted to have such simple notifications on my websites.
Demo
Download
The “Simplicity” is what makes them look really good. The way they simply pop out and disappear.
So I pulled out my sleeves and made one for myself. A very similar to Facebook’s one.
So here’s the CSS for our simple little Alert Box. You can always edit as per your needs though.
And here’s the JS code that I used to pop it out and make it vanish after a Timeout. I made a function for this called “alert()” which takes 2 arguments. First is the “textToshow” which surely the text/ notification you need to show. And the second is the “timeToShow” which is the time the notification should be shown to the user in milliseconds.
I ve also created a Fiddle for this.
Feel free to use it the way you want.