Skip to content
johanv edited this page Oct 16, 2012 · 3 revisions

Some hints about Javascript and JQuery:

Debug output

If you want to print something to the console, you can use console.debug('my message'), or, hotot specific, hotot_log('my label','my content').

You can output the contents of a JSON-object as follows:

hotot_log('some label', JSON.stringify(some_object));

Or the HTML in e.g. the main page using JQuery:

hotot_log('some label', $("#main_page").html())

Another example, showing the html output for tweets[i]:

hotot_log('ExpandUrls', $("li[tweet_id='"+tweets[i].id_str+"']").html());
Clone this wiki locally