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 only the forms where the input named done has a
value of 1?
If so you could probably do something like this:
$('.actionForm', myDiv).filter(function(){
return ($(this).children('[EMAIL PROTECTED]"1"]').length > 0);
});
Though Im not sure what you're trying to end up with...
bmckenzie wrote:
>
> 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 the values like this:
>
> var myForms = $('.actionForm', myDiv);
> $( myForms ).each(function(){
> alert(this.done.value); //displays 1 or 0
> });
>
> So I guess this depends on what the meaning of "this" is, eh?
>
> Bruce
>
>
>
>
--
View this message in context:
http://www.nabble.com/What-is-%22this%22-question%2C-this-one-about-filters-tf2973568.html#a8325084
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/