Well it looks really cool, but I couldn't get it to work :/  In the immortal
words of Riddick:

"Pretend you're talking to someone who was educated in the penal system... 
In fact, don't pretend."

Here's what I tried:  

$('[EMAIL PROTECTED]').debug("boo").each( function() {$(this).before('Current
length: <span style="color:'+((this.value.length >
parseInt(this.id.split("_")[1]))?'red':'green') +'" id="'+ this.id
+'_len">'+this.value.length.toString()+'</span> characters<br>').keyup(
function() {$('#'+ this.id +
'_len').html(this.value.length.toString()).css('color', ((this.value.length
> parseInt(this.id.split("_")[1]))?'red':'green')); } ); } );

and the error I get is:  jsO is not defined



Ⓙⓐⓚⓔ wrote:
> 
> you slap it up in any of your scripts... or a special one (just for
> debugging)
> 
> then you can insert .debug("any label") anywhere along the chain!
> 
> On 1/23/07, Daemach <[EMAIL PROTECTED]> wrote:
>>
>> Please don't forget that a noob started this thread ;)  How do I use that
>> code block?
>>
>>
>>
>> Ⓙⓐⓚⓔ wrote:
>> >
>> > Mike, I don't like breaking the chains... I just insert a debug in the
>> > middle of the chain...
>> >
>> > I use this for my debug:
>> > jQuery.fn.debug = function(message) {
>> >       return this.log('debug:' + (message || '')
>> > +"[").each(function(){jQuery.log(this);}).log("]");
>> > }
>> > jQuery.fn.log = jQuery.log = function(message) {
>> >       if (!message) message = 'UNDEFINED'
>> >       if (typeof message  == "object") message = jsO(message)
>> >       if(window.console && window.console.log) //safari
>> >               window.console.log(message)
>> >       else if(window.console && window.console.debug) //firebug
>> >               window.console.debug(message)
>> >       else
>> >               jQuery("body").prepend(message+ "<br/>")
>> >       return this
>> > }
> 
>> >
>> > --
>> > Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
>> > _______________________________________________
>> > jQuery mailing list
>> > [email protected]
>> > http://jquery.com/discuss/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/What-tools-should-I-use-to-troubleshoot-jquery-problems--%28John-Resig%2C-jquery-team%2C-other-gurus-please-share-your-tricks...%29-tf3066235.html#a8552883
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> _______________________________________________
>> jQuery mailing list
>> [email protected]
>> http://jquery.com/discuss/
>>
> 
> 
> -- 
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/What-tools-should-I-use-to-troubleshoot-jquery-problems--%28John-Resig%2C-jquery-team%2C-other-gurus-please-share-your-tricks...%29-tf3066235.html#a8553297
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to