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.