Created
October 28, 2009 18:37
-
-
Save marciobarrios/220692 to your computer and use it in GitHub Desktop.
plugins para debugear en jquery
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
//para debugear con mensajes | |
$.log = function(message) { | |
if(window.console) { | |
console.debug(message); | |
} else { | |
alert(message); | |
} | |
}; | |
//para hacer un alert del objeto | |
$.fn.debug = function() { | |
return this.each(function(){ | |
if(window.console) { | |
console.debug(this); | |
} else { | |
alert(this); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment