On 11/02/2010 5:10 AM, Trevor Orr wrote:
Is there a way to get all tags that do not have a particular class ?

For Example:

<a class="abc xyz">123</a>
<a class="abc xyz">456</a>
<a class="abc">789</a>

I only want to get the first 2 a tags. I have no control over the html, I am just processing it.

I could get all a tags and loop through them and check if it has a particular class but would rather not have to if possible.


To get all tags that do *not* have a particular class, you need to use the :not() pseudoselector: http://mootools.net/shell/EJffu/1/

- Barry
www.barryvan.com.au

Reply via email to