Oliver Boermans schrieb:
> On 01/01/07, John Resig <[EMAIL PROTECTED]> wrote:
>   
>> So, the only solution that'll solve your problem would by one that's
>> much more verbose:
>>
>> $("li").filter(function(){
>>   return $("ol:not([EMAIL PROTECTED])", this).length == 0;
>> });
>>     
>
> I'm still battling to get this to work.
> If I understand this intention of the above code,
>
> // This (note the simplification):
> $("li").filter(function(){
>  return $("ol", this).length == 0;
> });
>
> // Ought to select the same elements as:
> $("li:not[ol]");
>   
Actually that would be:

$("li:not([ol])");


But you are right, the filter(function) approach that John mentioned 
simply doesn't work. "this" is the window object inside the function, 
which is not very useful. I'm gonna check, and if I get it working, 
document it.

-- 
Jörn Zaefferer

http://bassistance.de


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

Reply via email to