Created
September 17, 2013 08:12
-
-
Save mritzco/6591410 to your computer and use it in GitHub Desktop.
Console.log very simple trick to see your debugging messages on tablets, phones or other devices.
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
/* Style a layer to display the console.log messages */ | |
#consolediv { | |
position: absolute; | |
top:0; | |
left:0; | |
bottom:0; | |
overflow: auto; | |
font-size: 10px; | |
color: #333; | |
width:200px; | |
} |
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
/* | |
* @author Itzco | |
* @version 0.1 | |
* console.log | |
* This is a very simple trick to debug in tablets or other devices. I was missing my console.log messages | |
* Add into your HTML code: <div id="consolediv"></div> | |
*/ | |
var console = new myconsole(); | |
console.log("hello"); | |
function myconsole() | |
{ | |
this.log = function(msg){ | |
$("#consolediv").append("<p>" + msg + "</p>"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment