Skip to content

Instantly share code, notes, and snippets.

@christianbundy
Created May 8, 2014 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianbundy/34b3f8ec0e7013627f59 to your computer and use it in GitHub Desktop.
Save christianbundy/34b3f8ec0e7013627f59 to your computer and use it in GitHub Desktop.
var createAlert = function (level) {
UI.registerHelper(level, function(title, msg) {
"use strict";
var str = '<strong>' + title + '</strong> ' + msg;
return '<div class="alert alert-' + level + '">' + str + '</div>';
});
}
createAlert('success');
createAlert('info');
createAlert('warning');
createAlert('danger');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment