this will return a child for this scenario as well:
<div id='one'>
<div>
<div class='wanted'></div>
</div>
</div>
$('one').getElement('wanted')
so its not right.
i guess this will require some sort of hack. i was thining of something like
this (brobably will need to be tested and fixed):
Element.extend({
findImediateChildren : function(match){
var temp_class = 'a-very-unlikely-maybe-random-class-name',result;
this.addClass(temp_class);
result = this.getParent().getElements('.'+temp_class+'>'+match);
this.removeClass(temp_class);
return result;
}
})
-----------
אריה גלזר
052-5348-561
5561
On Tue, Dec 1, 2009 at 02:07, Steve Onnis <[email protected]> wrote:
> if you only want the first one though you can do it like this
>
> http://mooshell.net/baL9h/2
>
> ------------------------------
> *From:* Roman Land [mailto:[email protected]]
> *Sent:* Sunday, 29 November 2009 3:29 AM
> *To:* [email protected]
> *Subject:* Re: [Moo] fetch immediate child
>
> Now thats an overengineered answer! xp
>
> On Sat, Nov 28, 2009 at 6:21 PM, Ryan Florence <[email protected]>wrote:
>
>> http://mooshell.net/rpflo/baL9h/ - like this?
>>
>> Ryan Florence
>>
>> [Introducing MooDocs - become a better developer](
>> http://blog.flobro.com/ )
>>
>>
>>
>>
>> On Nov 28, 2009, at 9:16 AM, Sanford Whiteman wrote:
>>
>> No, he wants only immediate children:
>>>>
>>>
>>> OK, I must have misread that something wasn't working with
>>> getChildren (which would have been the default method).
>>>
>>> -- Sandy
>>>
>>>
>>
>
>
> --
> ---
> "Make everything as simple as possible, but not simpler."
>
> - Albert Einstein
>
>