The jQuery plugin for showing message with Bootstrap alert classes
npm install bootstrap-msgtype can be info, success, warning or danger. If timeout is not set, will use default timeout |
showMessage with type is info |
showMessage with type is success |
showMessage with type is warning |
Msg.danger |
showMessage with type is danger |
Msg.timeout
5 * 1000 |
5 * 1000 |
5 * 1000 |
5 * 1000 |
Msg.icon
fa fa-info-circle |
fa fa-check-circle |
fa fa-exclamation-circle |
fa fa-times-circle |
javascript
Msg.icon = {
info: 'fa fa-bath',
success: 'fa fa-anchor',
warning: 'fa fa-bell-o',
danger: 'fa fa-bolt'
};
`
$3
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;
$3
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