On 31/12/06, Blair Mitchelmore <[EMAIL PROTECTED]> wrote:
> I'm not sure but I think that .not(obj) is currently implemented to
> exclude singular DOM elements, meaning arrays of elements and jQuery
> element sets wouldn't do anything. That could maybe be an API change for
> jQuery 1.1?
>
> -blair

Sounds like a good idea - I guess the next step is to submit a bug?

In the meantime - perhaps there is a different way to solve the
problem I am tackling. If it's messy enough perhaps the need for added
.not() functionality will be clarified.

I am aiming to select every li whose immediate children ol elements
ALL have a particular attribute set (previously with javascript).

Example HTML:
...
<ol>
        <li> <!-- This li should NOT be selected -->
                <ol> <!-- As this li lacks attribute 'kids' -->
                        <li>...</li>
                </ol>
                <ol kids="4">
                        <li>...</li>
                        <li>...</li>
                        <li>...</li>
                        <li>...</li>
                </ol>
                <ol kids="2">
                        <li>...</li>
                        <li>...</li>
                </ol>
        </li>
        <li> <!-- This li should be selected -->
                <ol kids="3"> <!-- As this li AND... -->
                        <li>...</li>
                        <li>...</li>
                        <li>...</li>
                </ol>
                <ol kids="1"> <!-- this li both have attribute 'kids' -->
                        <li>...</li>
                </ol>
        </li>
</ol>
...

Another way of expressing what I'm trying to do:

$("li").not("[EMAIL PROTECTED]'undefined']]")...

Obviously this doesn't work on a number of levels.

It occured to me that I could, earlier in the process, set kids to 0
on every ol. Allowing for something more like

$("li").not("[EMAIL PROTECTED]'0']]")...

But this didn't solve my fundamental problem - how do I check
attributes of ALL the children of the li?

Am I asking the right question?
My mind is a soup of confused double negatives ;/

Happy New Year!
Ollie

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to