Posted By

benjaminpearson on 11/03/09


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

danielz


jQuery Log Function


 / Published in: jQuery
 

  1. /**
  2.  * Used to log to the console.
  3.  * Call it by writing $.log('your message here')
  4.  */
  5. jQuery.fn.log = function (msg)
  6. {
  7. try
  8. {
  9. if (console)
  10. console.log("%s: %o", msg, this);
  11. }
  12. catch(e) {}
  13.  
  14. return this;
  15. }

Report this snippet  

You need to login to post a comment.