I am wondering if this is a bug:
<body id='body'>
<div id='foo' class='div_a'>
<span class='span_a'></span>
<div class='div_a'>
<span class='span_a'></span>
<div class='div_a'>
<span class='span_a'></span>
</div>
</div>
</div>
</body>
I would expect
$('foo').select('div.div_a > span.span_a')
to return three span elements because three of its span descendants
match the selector. In fact it only returns two, the two deepest ones.
It's the same with this selector:
$('foo').select('div.div_a span.span_a')
>From my experiments I get the impression that the select() context
element and all of its ancestors are completely taken out of the
selector match calculation.
Is this a bug or a limitation, or am I misunderstanding something?
http://www.entropy.ch/software/javascript/prototype-css-selector-test.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---