Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-24 Thread Klaus Hartl
Daemach wrote: Another fantastic tip. Thank you. Do not thank me :-) Thanks to Joe Hewitt for the incredible Firebug! I think it is the best tool ever for Frontend developing. -- Klaus ___ jQuery mailing list discuss@jquery.com

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-24 Thread Klaus Hartl
Ⓙⓐⓚⓔ 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 =

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-24 Thread Klaus Hartl
Ⓙⓐⓚⓔ 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 =

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-24 Thread Klaus Hartl
Jörn Zaefferer wrote: Daemach schrieb: Is there a list of rules somewhere that define where this is that or the reverse? I posted something recently that roughly covers this: http://bassistance.de/2007/01/23/unobtrusive-clear-searchfield-on-focus/ Maybe that helps. Nice, looks

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-24 Thread Jörn Zaefferer
Klaus Hartl schrieb: Jörn Zaefferer wrote: Daemach schrieb: Is there a list of rules somewhere that define where this is that or the reverse? I posted something recently that roughly covers this: http://bassistance.de/2007/01/23/unobtrusive-clear-searchfield-on-focus/

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-24 Thread Fil
http://bassistance.de/2007/01/23/unobtrusive-clear-searchfield-on-focus/ http://jquery.com/discuss/2007-January/022164/ Why not use .one()? $('#searchbox') .one('focus', function() { $(this).attr('value',''); } )

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-24 Thread Ⓙⓐⓚⓔ
YES we all need tiny mundane utilitarian plugins! Not to be confused with glorious or exotic or wild! They cut development time down! On 1/24/07, Klaus Hartl [EMAIL PROTECTED] wrote: Jörn Zaefferer wrote: Nice, looks exactly like the one I posted last week... ;-)

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-24 Thread Brice Burgess
Klaus Hartl wrote: Ⓙⓐⓚⓔ 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(]); }

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-24 Thread Ⓙⓐⓚⓔ
what looks like a plug-in and smells like a plug-in should be a plug-in! http://jpassoc.com/js/jquery-debug.js the updated (and corrected) debug that I use for Firefox+Firebug and Safari... it works with IE ... but it's not pretty! Any more info on debugging in IE can be incorporated, and a

[jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Daemach
I'm trying to sort out a problem with a selector and I'm not having much luck. I'm using firebug at the moment, but I'm not able to easily see what the selector is picking up, if anything. The first selector is here: $('#test :textarea').before('Current length:nbsp;span id='+ this.id

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Ⓙⓐⓚⓔ
this is not this! this is that! this is very much dependent on where this is used. inside an .each(), this is an element. inside a plugin this is a jquery object ( an array of elements). the this you used is weird on one, it is probably a null jquery object with no elements... but I've never

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Daemach
This or that...This or that... http://bboyflexi.imeem.com/music/j-_J-4tV/the_choice_is_yours/ The choice is yours! Is there a list of rules somewhere that define where this is that or the reverse? Or a very detailed description of what you're left with after a selector is run and the object

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Daemach
Hmm - and how could you make this code block set the initial length for pre-populated fields - that was the reason I was trying to use that first this. Or was it that? Maybe I just need to run a second selector that sets all the spans? Ⓙⓐⓚⓔ wrote: this is not this! this is that! this is

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Nate Cavanaugh
*EDIT* I have a feeling you're either coming from Prototype, or straight from DOM scripting. I had the same preconceived notions when I first started with jQuery... So here is my attempt to do what you're trying to do (and from my testing, it all works :)) $('#test textarea').each(function(){

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Daemach
Excellent. And you're right. Straight from DOM :) Thanks very much for taking the time. I see where I was going wrong. Nate Cavanaugh wrote: *EDIT* I have a feeling you're either coming from Prototype, or straight from DOM scripting. I had the same preconceived notions when I first

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Michael Geary
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

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Daemach
*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?

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Klaus Hartl
Daemach wrote: I'm trying to sort out a problem with a selector and I'm not having much luck. I'm using firebug at the moment, but I'm not able to easily see what the selector is picking up, if anything. The first selector is here: $('#test :textarea').before('Current length:nbsp;span

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Ⓙⓐⓚⓔ
inside every object's function there is a this... it all depends on which object has the function! inside an each function this is each element from the query inside a plug-in this is the jquery object that has an array of elements. most jq selectors keep a chain going so you have just what you

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Ⓙⓐⓚⓔ
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 =

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Jörn Zaefferer
Daemach schrieb: Is there a list of rules somewhere that define where this is that or the reverse? I posted something recently that roughly covers this: http://bassistance.de/2007/01/23/unobtrusive-clear-searchfield-on-focus/ Maybe that helps. -- Jörn Zaefferer http://bassistance.de

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Jörn Zaefferer
Ⓙⓐⓚⓔ schrieb: 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: I just took a look at Firebug lite, it is really worth it's bytes. At least in IE it works fine, and you can use format log statements like this:

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Ⓙⓐⓚⓔ
I couldn't debug without firebug! I assume every body has their favorite tricks... perhaps this should be on a fresh thread! On 1/23/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ schrieb: Mike, I don't like breaking the chains... I just insert a debug in the middle of the chain... I

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Daemach
Another fantastic tip. Thank you. Klaus Hartl wrote: Daemach wrote: I'm trying to sort out a problem with a selector and I'm not having much luck. I'm using firebug at the moment, but I'm not able to easily see what the selector is picking up, if anything. The first selector is here:

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Daemach
Gotcha :) Thanks again for the help! Ⓙⓐⓚⓔ wrote: inside every object's function there is a this... it all depends on which object has the function! inside an each function this is each element from the query inside a plug-in this is the jquery object that has an array of elements.

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Daemach
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:'

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Ⓙⓐⓚⓔ
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:

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Daemach
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

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Ⓙⓐⓚⓔ
ooops! you can see the whole bunch of my little javascript toys at http://jpassoc.com/js/my.js here's jso function jsO(obj) { // convert to simple js object for quick and dirty access almost anything // not a good function for dom stuff because of duplicate chidlren tags if (typeof obj ==

Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-23 Thread Ⓙⓐⓚⓔ
it's really old code but it still works and it fit inside debug very well... so I keep it! On 1/23/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: ooops! you can see the whole bunch of my little javascript toys at http://jpassoc.com/js/my.js here's jso function jsO(obj) { // convert to simple js object