Notification

You can show some notifications. It's a iOS like notification that you can set icon, title and text, and you can alose drag to close the notification.

Use JavaScript to open/close notification:

{% highlight js %} $.notification({ title: "Baby", text: "I miss you", media: "", data: "123", onClick: function(data) { $.alert("Click" + data); }, onClose: function(data) { $.alert("Close "+data); } }); //close notification $.closeNotification(); {% endhighlight %}

There is only one notification can shown in the same time. It means that the new notification will replace the old one.

Params

Param Default Description
title undefined Title of notification
text undefined Text of notification
media undefined Media of notification. It should be a icon with image or iconfont.
data undefined This data will be the param of onClick and onClose function.
onClick undefined Callback when user click.
onClose undefined Callback when notification is closed.
time 4000 The duration of notification.