Damien schrieb:
Hey all, this is my first time posting to the mailing list, so please,
be gentle. ;)

Anyway, to the point, I have long lists of items similar to the HTML
below

<li><span>Item 1</span></li>
<li><span><a href="htt://link/">Item 2</span></li>
<li><span><a href="#" rel="Text">Item 3</a></span></li>

Now, what I need to do here is be able to select and apply a function
to Item 1, without having the said function cascade and apply to Item
2 and Item 3.

Any one have any idea how I should go about this?

For your reference, here are the selectors I've been using for Item 2
and 3:

$("ul.preview span a")
Give this a try:

$("ul.preview span:not(:has(a))")

See http://docs.jquery.com/Selectors/not#selector and http://docs.jquery.com/Selectors/has#selector

-- Jörn

Reply via email to