jQuery Log Function


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.