Little trick to avoid problems with console.log in IE8.

if(!window.console) { window.console = { log : function(str) { return; }}; }
If you forget to remove console.log in your code, the browsers that don't support this feature (yes IE8) will fail showing an ugly error message.

With this little snippet this browsers won't do anything with the console instructions.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.