Skip to content

Instantly share code, notes, and snippets.

@Prinzhorn
Created December 28, 2011 16:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Prinzhorn/1528556 to your computer and use it in GitHub Desktop.
Save Prinzhorn/1528556 to your computer and use it in GitHub Desktop.
jQuery-inlog samples
$('#about').siblings('h1').add('h2').css('color', '#09f').end().css('text-transform', 'uppercase');
var defaults = {
enabled: false,//Enable logging
thisValue: false,//Output this-value
returnValue: true,//Output return-value
indent: true,//Indent nested calls (makes sense for maxDepth !== 0)
maxDepth: 0,//Max depth of nested calls
rawOutput: false//If true, the raw stacktrace-objects will be printed (thisValue, returnValue and indent are all included for free)
};
<body>
<div class="bar">
<div class="bar">
<div id="foo"></div>
</div>
</div>
<div id="bacon"></div>
</body>
$l(true);
$("#foo").parents(".bar").next().prev().parent().fadeOut();
$l(false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment