The following is my block of code. since I did not install Firebug in IE, every time I try to check my code in IE , I get a console undefined error message. so I decided and developed this code block, so console.log only works in firefox and avoids error messages in IE .
function clog() { if(window.console && window.console.firebug) { var a =[]; for(var i=0;i<arguments.length;i++) { a.push(arguments[i]); } console.log(a.join(' , ')); } }
my code is working fine and I get the results that I wanted
but when I tried to use the above code in jQuery (e.g. clog($('body')); ),
the result i was expecting should be jQuery(body) . but I get the result as [object Object]
How can I get the results that I expected?
Thanks!
user372551
source share