Created
February 16, 2012 11:45
-
-
Save dave1010/1844294 to your computer and use it in GitHub Desktop.
jQuery console logger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery Console Logger v1.0 | |
* | |
* Copyright 2012, Dave Hulbert | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* | |
* Usage: add ".log()" inline in a jQuery chain | |
* $('div').parent().parent().log().find('span').next().log(); | |
*/ | |
jQuery.fn.log = function() { | |
console.log(this); | |
return this; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment