Thanks for the verification, but there is no way I can do a loop just
to get a selector working.

It's strange this doesnt work, when el.get('text') works perfectly
fine....you would think it just use that


On Fri, Feb 13, 2009 at 2:51 PM, Iain <[email protected]> wrote:
>
> You are correct, it doesn't work for me either, unless i am also doing
> it wrong.
> The only work-around is to do...
>
> $$( 'p.description' ).each( function( p ) {
>    if( p.get( 'text' ).contains( 'whatever' ) ) {
>        // action here
>    }
> } );
>
> On Feb 13, 7:02 am, jacobf <[email protected]> wrote:
>> Hi,
>> Im trying to use some pseudo selector :contains() , but I am having
>> some very weird results:
>>
>> Here is a simple test for the mootools docs main page 
>> @http://mootools.net/docs/
>>
>> $$('p.description:contains("Core contains an")') should return the
>> first main paragraph, right? It returns nothing.
>>
>> However
>>
>> $$('p.description:contains("Core"):contains("contains"):contains
>> ("an")')  returns what Im looking for - the first paragraph
>>
>> Am I missing something obvious, or are spaces in :contains() broken?
>> The examples in the docs shows 2 words with a space should work.
>>
>> Thanks for any clarification.
> >
>



-- 
Jacob Farber
University of Toronto - ATRC
Tel: (416) 946-3002
www.fluidproject.org

Reply via email to