*cheer*  Exactly what I was asking for.  Thank you very much. 


Michael Geary wrote:
> 
>> Is there a way to just return the jquery object (so I could 
>> see it in firebug's watch section) then pass it to another 
>> jquery function then join them all up when I know
>> everything works?
>> 
>>      $('#test :textarea').before('Current length:&nbsp;<span id="'+
> this.id +'_len">'+this.value.length+'</span>&nbsp;characters').keypress(
> function()
>>     { 
>>          $('#'+this.id + '_len').css('color', ((this.value.length >
> parseInt(this.id.split()[1]))?'red':'green')).html(this.value.length)
>>      });
> 
> Yes, breaking up your chains is one of the first things do do when you're
> having trouble. For example:
> 
>     var $test = $('#test :textarea');
>     $test.before('Current length:&nbsp;<span id="'+ this.id
>         +'_len">'+this.value.length+'</span>&nbsp;characters');
>     $test.keypress( function() { 
>          var $len = $('#'+this.id + '_len');
>          $len.css('color', ((this.value.length >
> parseInt(this.id.split()[1]))?'red':'green'));
>          $len.html(this.value.length);
>      });
> 
> Now you'll find it easier to debug.
> 
> -Mike
> 
> 
> _______________________________________________
> 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#a8550597
Sent from the JQuery mailing list archive at Nabble.com.


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

Reply via email to