Permalink
Browse files

Add debug value in the _internal object in order to disable the debug…

… logging. Closes #79

Disable the debug logging by default
Update README.md to add information about debug
  • Loading branch information...
1 parent 489ebf6 commit f9e23ba5646a0fa3fd7b7e3dac322d02170583fa @nyroDev committed Apr 16, 2011
Showing with 15 additions and 1 deletion.
  1. +13 −0 README.md
  2. +2 −1 js/jquery.nyroModal.js
View
@@ -249,3 +249,16 @@ Here is a list of the filters officially provided:
* Embedly: Used to show a bunch of different element using [embedly API](http://embed.ly/) ([Examples](http://nyromodal.nyrodev.com/v2/embedly.php)) (depends on link)
##Animations
+
+
+##Debug
+In order to enable the debug mode, you should change the debug value of the internal object. You can do it like:
+ $.nmInternal({debug: true});
+
+By default, the debug function show function name in the console. If you want do something else, you should overwrite the _debug function like:
+ $.nmInternal({
+ _debug: function(msg) {
+ if (this.debug && window.console && window.console.log)
+ window.console.log(msg);
+ }
+ });
@@ -502,6 +502,7 @@ jQuery(function($, undefined) {
},
_internal = {
firstInit: true,
+ debug: false,
stack: [],
fullSize: {
w: 0,
@@ -564,7 +565,7 @@ jQuery(function($, undefined) {
},
_debug: function(msg) {
- if (window.console && window.console.log)
+ if (this.debug && window.console && window.console.log)
window.console.log(msg);
},

0 comments on commit f9e23ba

Please sign in to comment.