[jQuery] Re: querying an array

2008-09-30 Thread Paul Mills
I'm not sure why you are creating the array. If you don't need it for anything else then you can get at the html in one line: var test = $('.RepeatedItemElement[id = "headline"]', this.parent).html(); On Sep 30, 3:51 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I was expecting this kin

[jQuery] Re: querying an array

2008-09-30 Thread equallyunequal
Excuse my rather... verbose response. This should work for you, and is simpler: $("[attrib='value']", this.elements).html(); Although, now that I re-read your first post, it seems that you already know about the optional context parameter. I don't understand how this was a problem for you. On

[jQuery] Re: querying an array

2008-09-30 Thread equallyunequal
jQuery( expression, [context] ) Note the optional context parameter. So, you can do this: $("[attrib='value']", this.elements).each( function() { console.log(this); } ); On Sep 30, 10:51 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I was expecting this kind of answer ! :) > > Could you i

[jQuery] Re: querying an array

2008-09-30 Thread [EMAIL PROTECTED]
I was expecting this kind of answer ! :) Could you ignore the fact that it has to be unique, let's say I want to query on another attribute. And I want the query to limit the search to the elements in my Array. How do I do that ? On 30 sep, 15:37, BB <[EMAIL PROTECTED]> wrote: > An ID has to be

[jQuery] Re: querying an array

2008-09-30 Thread BB
An ID has to be uniq so you can just do that: $("#headline").html(); On 30 Sep., 15:40, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I've build the following array using all the element in this.parent > which have a class '.RepeatedItemElement' : > > this.elements = $(".RepeatedItemE