Set up and click "show" to see effect.

Source Code

1
2
3
4
5
6
7
8
9
10
11
var typeMap = {
  error: 'danger',
  notice: 'info',
  alert: 'warning'
};
flash.setting.appendTo = '#flash-messenger';
flash.setting.message = '<div class="alert alert-{type}">{message}<i class="glyphicon glyphicon-remove"></i></div>';
flash.setting.closeHandler = '.glyphicon-remove';
flash.setting.convert = function (options) {
  options.type = typeMap[options.type] || options.type;
};