3 ms·
You could do this by adding your own .debug() function. In some ways this would add an advantage, because you would be making your debug code reusable. Example
by shib71 16y ago
You could do this by adding your own .debug() function. In some ways this would add an advantage, because you would be making your debug code reusable.
Example:
jQuery.fn.debug = function(){
if (console && console.log)
console.log(this);
return this;
};
...
$('#elm').debug().color('red').debug().click(function(){}).debug();