Created
January 12, 2010 19:43
Revisions
-
paulirish revised this gist
Jan 21, 2010 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ $.logCallsTo = function(method,isOn$){ (isOn$ ? $ : $.fn)[method] = function(){ window.console && console.log.apply(console,[this,method,arguments]); return old.apply(this,arguments); } } -
paulirish revised this gist
Jan 12, 2010 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,9 @@ // $.logCallsTo('append'); // $.logCallsTo('curCSS',true); // output: // http://gyazo.com/40cec25d875a7a767e95fd7a2f451b32.png $.logCallsTo = function(method,isOn$){ var old = isOn$ ? $[method] : $.fn[method], that = this; -
There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ // sorta like manual profiling. // peek into your jquery method calls to see why they are being called so much // usage: // $.logCallsTo('append'); // $.logCallsTo('curCSS',true); $.logCallsTo = function(method,isOn$){ var old = isOn$ ? $[method] : $.fn[method], that = this; (isOn$ ? $ : $.fn)[method] = function(){ window.console && console.log.apply(console,[this,method,arguments]); old.apply(this,arguments); } }