bootstrap-msg
v1.0.8
Published
The jQuery plugin for showing message with Bootstrap alert classes
Downloads
68
Maintainers
Readme
BootstrapMsg
The jQuery plugin for showing message with Bootstrap alert classes (http://ducdhm.github.io/bootstrap-msg/)
Shortcuts
Dependencies
Methods
| Name | Params (ParamType: ParamName) | Description |
|-------------|--------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| Msg.show | String: typeString: messageNumber: timeout | Show message. type
can be info
, success
, warning
or danger
. If timeout
is not set, will use default timeout |
| Msg.info | String: messageNumber: timeout | Shortcut of showMessage
with type
is info
|
| Msg.success | String: messageNumber: timeout | Shortcut of showMessage
with type
is success
|
| Msg.warning | String: messageNumber: timeout | Shortcut of showMessage
with type
is warning
|
| Msg.error | String: messageNumber: timeout | Alias of Msg.danger
|
| Msg.danger | String: messageNumber: timeout | Shortcut of showMessage
with type
is danger
|
Default
Timeout
Timeout for BootstrapMsg is available at Msg.timeout
| Type | Timeout (in ms) |
|---------|-----------------|
| info | 5 * 1000
|
| success | 5 * 1000
|
| warning | 5 * 1000
|
| danger | 5 * 1000
|
Icon
Icon for BootstrapMsg is available at Msg.icon
| Type | Class |
|---------|----------------------------|
| info | fa fa-info-circle
|
| success | fa fa-check-circle
|
| warning | fa fa-exclamation-circle
|
| danger | fa fa-times-circle
|
Custom Icon
If you want to custom icon for BootstrapMsg, you just need to specify icon class for each message type. Example:
Msg.icon = {
info: 'fa fa-bath',
success: 'fa fa-anchor',
warning: 'fa fa-bell-o',
danger: 'fa fa-bolt'
};
Using Bootstrap Icon
We already define a Bootstrap icon set for BootstrapMsg at Msg.ICON.BOOTSTRAP
. For using this icon set, just need Msg.icon = Msg.ICONS.BOOTSTRAP;
Hide icon
If you do not want to show icon in BootstrapMsg, you can set Msg.iconEnabled = false;
Extra class
If you want to add extra class to BootstrapMsg element, just change Msg.extraClass
for default extra class
License
Please read at here