Created
December 4, 2014 20:49
-
-
Save jdcauley/e2a416f5c7879d6cedf3 to your computer and use it in GitHub Desktop.
Simple Notifications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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