[jQuery] Re: Selector challenge?

2007-07-13 Thread Gilles (Webunity)
Yeah that was what i finally came up with John, but a reverse search would be cool (someday) ;) On 13 jul, 14:51, "John Resig" <[EMAIL PROTECTED]> wrote: > If that break is guaranteed to be there, then this will work: > jQuery('.formError:first', this).prev().prev(':input') > > --John > > On 7/13

[jQuery] Re: Selector challenge?

2007-07-13 Thread John Resig
If that break is guaranteed to be there, then this will work: jQuery('.formError:first', this).prev().prev(':input') --John On 7/13/07, Gilles (Webunity) <[EMAIL PROTECTED]> wrote: ... As said. in the application i am building iit should find the previous form element, no matter where it

[jQuery] Re: Selector challenge?

2007-07-13 Thread Gilles (Webunity)
... As said. in the application i am building iit should find the previous form element, no matter where it is located ;) On 13 jul, 12:19, "Juha Suni" <[EMAIL PROTECTED]> wrote: > Gilles (Webunity) wrote: > > Well i've tried that one off course, but the problem is that i don't > > know, how

[jQuery] Re: Selector challenge?

2007-07-13 Thread Juha Suni
Gilles (Webunity) wrote: Well i've tried that one off course, but the problem is that i don't know, how much markup comes before the So i tried this as well; jQuery('.formError:first', this).prev(':input') but that doesn't work, even though the docs state it should work. I think that only

[jQuery] Re: Selector challenge?

2007-07-13 Thread Gilles (Webunity)
Well i've tried that one off course, but the problem is that i don't know, how much markup comes before the So i tried this as well; jQuery('.formError:first', this).prev(':input') but that doesn't work, even though the docs state it should work. On 13 jul, 11:30, "Juha Suni" <[EMAIL PROTECTE

[jQuery] Re: Selector challenge?

2007-07-13 Thread Juha Suni
Gilles (Webunity) wrote: Given this query: jQuery('.formError:first', this); I basically have this question: How can i find the first input element, before an object? How about jQuery('.formError:first', this).prev(); That should do the trick. -- Suni

[jQuery] Re: SELECTOR CHALLENGE

2007-06-25 Thread Ⓙⓐⓚⓔ
oops http://jqueryjs.googlecode.com/svn/trunk/jquery/ On 6/25/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: ouch! namespaces are second class citizens in the JavaScript world! I think the latest version of jQuery handles it better. so Sean's should work. http://jqueryjs.googlecode.com/svn/branches/1.2

[jQuery] Re: SELECTOR CHALLENGE

2007-06-25 Thread Ⓙⓐⓚⓔ
ouch! namespaces are second class citizens in the JavaScript world! I think the latest version of jQuery handles it better. so Sean's should work. http://jqueryjs.googlecode.com/svn/branches/1.2/ On 6/25/07, John Farrar <[EMAIL PROTECTED]> wrote: This didn't seem to match attributes. On Ju

[jQuery] Re: SELECTOR CHALLENGE

2007-06-25 Thread John Farrar
Well, for this to pass a jquery object you can't use an equality boolean phrase in JS... unless I am doing something wrong. (Plus if it did work wouldn't that pass individual ones out? Or does it continue to loop regardless of if you passed a return or not? On Jun 25, 8:36 pm, "Sean Catchpole" <[

[jQuery] Re: SELECTOR CHALLENGE

2007-06-25 Thread John Farrar
This didn't seem to match attributes. On Jun 25, 8:34 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote: > var myResults = $('form').filter(function(){return ! > $(this).html().match('coop:manage')}) > > // untested, and rather sloppy... but it should do the job > > On 6/25/07, John Farrar <[EMAIL PROTECTED]>

[jQuery] Re: SELECTOR CHALLENGE

2007-06-25 Thread Sean Catchpole
On 6/25/07, John Farrar <[EMAIL PROTECTED]> wrote: OK... is there a way to concactinate the results. I can pull the ID's of each form and then is there a way to re-assemble them into a jquery object collection? Hmm ok, you can try this: jQuery('form').filter(function(i){ return $(this).attr('c

[jQuery] Re: SELECTOR CHALLENGE

2007-06-25 Thread Ⓙⓐⓚⓔ
var myResults = $('form').filter(function(){return ! $(this).html().match('coop:manage')}) // untested, and rather sloppy... but it should do the job On 6/25/07, John Farrar <[EMAIL PROTECTED]> wrote: NOTE: I can select the forms and loop through them using var myResults = new Array(); jQuer

[jQuery] Re: SELECTOR CHALLENGE

2007-06-25 Thread John Farrar
OK... is there a way to concactinate the results. I can pull the ID's of each form and then is there a way to re-assemble them into a jquery object collection? Thanks, John Farrar On Jun 25, 8:09 pm, "Sean Catchpole" <[EMAIL PROTECTED]> wrote: > On 6/25/07, John Farrar <[EMAIL PROTECTED]> wrote

[jQuery] Re: SELECTOR CHALLENGE

2007-06-25 Thread Sean Catchpole
On 6/25/07, John Farrar <[EMAIL PROTECTED]> wrote: var myResults = new Array(); jQuery('form').each(function(){ if(this.attr('coop:manage') == "true") myResults[myResults.length] = this; }); return myResults; I may be mistaken, but I believe that currently jQuery does not support attribu

[jQuery] Re: SELECTOR CHALLENGE

2007-06-25 Thread John Farrar
NOTE: I can select the forms and loop through them using var myResults = new Array(); jQuery('form').each(function(){ if(this.attr('coop:manage') == "true") myResults[myResults.length] = this; }); return myResults; ...but that gives me an array that is non-jquery and it isn't as good as i