Re: [jQuery] What is "this" question, this one about filters

2007-01-14 Thread Jörn Zaefferer
bmckenzie schrieb: > > Jörn Zaefferer wrote: > >> The filter(function) needs jQuery 1.1a+ to work correctly. Older >> versions accept the Function, but apply different scope and different >> arguments. >> >> I suspect that this is the reason why it isn't working, I can't see >> anything wrong

Re: [jQuery] What is "this" question, this one about filters

2007-01-14 Thread bmckenzie
Jörn Zaefferer wrote: > > The filter(function) needs jQuery 1.1a+ to work correctly. Older > versions accept the Function, but apply different scope and different > arguments. > > I suspect that this is the reason why it isn't working, I can't see > anything wrong with your code. If an upgr

Re: [jQuery] What is "this" question, this one about filters

2007-01-13 Thread Nate Cavanaugh
When you say a done input, what do you mean? Is the input's name "done"? I believe your filter is operating on the form itself, whereas each is operating on all of the children elements. Im not sure though, because it's kind of hard to know what you're trying to do. Are you trying to return onl

Re: [jQuery] What is "this" question, this one about filters

2007-01-13 Thread Jörn Zaefferer
bmckenzie schrieb: > So I guess this depends on what the meaning of "this" is, eh? > The filter(function) needs jQuery 1.1a+ to work correctly. Older versions accept the Function, but apply different scope and different arguments. I suspect that this is the reason why it isn't working, I can'

Re: [jQuery] What is "this" question, this one about filters

2007-01-13 Thread bmckenzie
Rigent wrote: > > You're not setting the done input to 0 or 1 because you have the double > '=' in there, it should be: > > return this.done.value = 1; > > Actually, I want a collection containing the forms where the field "done" has already been set to 1. B. -- View this message in co

Re: [jQuery] What is "this" question, this one about filters

2007-01-13 Thread Ⓙⓐⓚⓔ
I hope I got the filter right... I looked back at some of my similar code, jQuery.fn.randomOne=function(){ return this.eq( Math.floor(Math.random()*this.length)); } is a simple plugin to get (in my case) one random element and this is the jq element. On 1/13/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTE

Re: [jQuery] What is "this" question, this one about filters

2007-01-13 Thread Ⓙⓐⓚⓔ
this is this here and that there! inside the each, this is a element. inside the filter it's the jq object that contains all your actionform classed items inside myDiv. On 1/13/07, bmckenzie <[EMAIL PROTECTED]> wrote: > > Greetings. > > I'm trying to get a list of forms from a DIV where the form's

[jQuery] What is "this" question, this one about filters

2007-01-13 Thread bmckenzie
Greetings. I'm trying to get a list of forms from a DIV where the form's "done" input is set to 1 or 0 . Why does this code throw an error ("this.done.value has no properties") ? var myForms = $('.actionForm', myDiv).filter(function(){ return this.done.value==1 ; }); I can get th