Skip to content

Instantly share code, notes, and snippets.

@andrewrota
Last active December 28, 2015 19:49
Show Gist options
  • Save andrewrota/7552639 to your computer and use it in GitHub Desktop.
Save andrewrota/7552639 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
$('body').prepend('<div id="console" class="alert alert-warning">');
var $console = $('#console');
$console.css('font-family', 'monospace');
$console.hide();
console = {
log: function (text) {
$console.show();
$console.append('<p>' + text + '</p>');
},
clear: function () {
$console.empty();
},
hide: function() {
$console.hide();
},
show: function() {
$console.show();
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment