-
-
Save dgalarza/361601 to your computer and use it in GitHub Desktop.
This file contains 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
// allows you to log an object while staying in the chain | |
(function($){ | |
var console = ("console" in window) ? window.console : { "log": alert, "dir": alert }; | |
$.extend($.fn, { | |
log: function(){ | |
console.log(this); | |
return this; | |
}, | |
dir: function(){ | |
console.dir({ | |
elements: this, | |
length: this.length, | |
selector: this.selector, | |
context: this.context, | |
}); | |
return this; | |
}, | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment