But hey! There is a Firebug Lite, which comes to the rescue. It is a small emulation of Firebug and provides console.log() in IE, too. Great. But OTOH one now has to explicitly load the Firebug Lite stuff and for quick debugging an even small and minimal console.log() would be sufficient, too.
Additionally, I really want to combine console.log() and jQuery and use something like $('div#foo').log("some message about foo"), of course.
This jQuery plugin provides the following main features:
- global jQuery method $.debug([true|false])
This is the global jQuery method which can be used to get and set the flag which indicates whether
debugging is enabled or not. The default is the value of the debug attribute of the <html> node or the value false.
- global jQuery method $.log(message)
This is the global jQuery method for logging message to either Firebug, Firebug-Lite or the home-brewn minimum Firebug emulation console.
- jQuery object method $(…).log([message])
This is the jQuery object method for logging the jQuery items in the jQuery object and optionally the message to either Firebug, Firebug-Lite or the home-brewn minimum Firebug emulation console.
This jQuery plugin can be downloaded from the File Repository area.