A simple info
notice type with a simple text.
There are four types of notice :
info
, warning
, success
and error
.
You can give a title to the notice by specifying a second string argument
Note : The title argument must always be specified before the text argument
There is a third argument for more options. This must be an object.
You do not need to use the string type arguments to set the title and the text. You can directly define them in the options argument.
There are several stacks for notices who fit several positions in the window.
For specify it, you must use the stack
option.
Note : The default stack is top-right
Top & bottom stacks
Corner stacks
Center stack
Each type has a default display duration.
You can override by setting the option duration
, expressed in seconds
Note : When you put your mouse over the notification, it will never disappear automatically. However, when you take your mouse, the timer will be restarted.
You can make notify.me compatible with Bootstrap 2/3 and FontAwesome <=3/4 by calling the dedicated methods :
For Bootstrap 2 :
For Bootstrap 3 :
For FontAwesome <= 3 :
For FontAwesome 4 :
Name | Type | Default | Comment |
---|---|---|---|
stack | string | 'top-right' | Allows you to choose the stack which should see the notice.
Currently there 7 stacks : top-left ,
top ,
top-right ,
bottom-left ,
bottom ,
bottom-right and
center
|
duration | int boolean |
used type duration | You can specify the display duration by setting this options with a value in second.
You can also set it to false to prevent the notice to automatically hide.
If you do not set anything, the duration will be the duration of used type.
The default type's durations are :
|
icon | string boolean |
used type icon | You can change the icon by setting this option. Icons are defined by the class attribute.
If you use Bootstrap or FontAwesome, you can set the icon by using the classes provide by them. If you want use you own icons system, you must declare each class in own stylesheet. |
frozen | boolean | false | Hide the close button
Attention : If you set frozen to true and duration to false
the notice will stay all the time.
|