Created
June 11, 2012 16:19
-
-
Save shanejdonnelly/2910973 to your computer and use it in GitHub Desktop.
Add a debug console to IE
This file contains 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
//set the console log area up - only populated if IE | |
$('body').append('<div id="debug" style="position: absolute; top: 0; left: 200px; background: #fff; display: none; visibility: hidden;"></div>') | |
//log messages to this function instead of using console.log | |
function ie_console_log(console_message) { | |
try { | |
console.log(console_message) | |
} | |
catch (e) { | |
$('#debug').append('<div class="debug">'+ console_message +'</div>') | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment