[jQuery] filter(fn)
[jQuery] filter(fn)
Hi everyone,
I am new to this group. I have been trying to get filter(function) to
work for a few days without success. My goal was to remove DOM
elements that did not belong to a pre-arranged array. Out of
desperation I tried the example given in the on line documentation at
http://docs.jquery.com/Traversing/filter#fn. The example is:
$("p").filter(function(index) {
return $("ol", this).length == 0;
});
with the corresponding HTML code:
<ol><li>Hello</li></ol>
How are you?
THIS DID NOT WORK!
Is it a bug in jQuery or am I doing something wrong? Could one of you
try this same example? Thank you.
Pluthos