Skip to content

Instantly share code, notes, and snippets.

@jdcauley
Created December 4, 2014 20:49
Show Gist options
  • Save jdcauley/e2a416f5c7879d6cedf3 to your computer and use it in GitHub Desktop.
Save jdcauley/e2a416f5c7879d6cedf3 to your computer and use it in GitHub Desktop.
Simple Notifications
function notification(status, message, callback){
var target = document.getElementById('mc_embed_messages');
if(status === 500){
target.innerHTML = '<span class="error-title">ERROR:</span> ' + message;
target.className = "error";
callback();
}
if(status === 200){
(message);
target.innerHTML = message;
target.className = "success";
callback();
}
}
notification(500, 'It looks like something is wrong on our end, please try again.', function(res){});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment