Comment

Comment by hkuo

If you use jquery, I wrote this really simple snippet that I use for quick down and dirty debugging.

var logit = function(x){$('body').append('<div id=logit></div>');$('#logit').css({'background':'#000','position':'fixed','bottom':0,'right':0,'color':'#fff','padding':5,'font-family':'arial','font-size':'9px','z-index':9999});$('#logit').append(x+'<br>');};

It could very easily be adjusted for non-jquery too.

Then just call it like: logit(whateverYouWantToDisplay);

parent hkuo 13 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton