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
Ⓙⓐⓚⓔ 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 =
Ⓙⓐⓚⓔ 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 =
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
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/
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','');
}
)
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... ;-)
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(]);
}
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
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
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
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
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
*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(){
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
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
*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?
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
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
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 =
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
Ⓙⓐⓚⓔ 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:
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
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:
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.
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:'
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:
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
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 ==
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
30 matches
Mail list logo