I was confronted with a similar problem a few weeks ago and solved it
by borrowing
some code from the YUI library. So I composed this little plugin:
(function($) {
$.fn.extend({
isAncestor: function(descEl) {
var ancEl = this[0];
if (ancEl.contains) {
In the docs, where 'expr' as stated as being either a 'string' or an
'expression' it means that it is a selector expression, ie. a string
that would be acceptable as a selector in $("selector").
In all the examples you have given - filter, find, parent, etc - the
expected argument is a selector ex
Karl,
>Yeah, it's also strange that while this doesn't work:
>$("body > ul > li").filter($li[0]);
>
>this does:
> $("body > ul > li").not($li[0]);
>
>I'm a little lost by your parents example, though. Not sure exactly
>what you're trying to get (esp. since you don't show where you'v
Hey Dan,
Yeah, it's also strange that while this doesn't work:
$("body > ul > li").filter($li[0]);
this does:
$("body > ul > li").not($li[0]);
I'm a little lost by your parents example, though. Not sure exactly
what you're trying to get (esp. since you don't show where you'v
Just wonder if there were any comments to this?
On May 5, 4:24 pm, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> One thing that I've noticed is that the "expr" attribute is pretty
> inconsistent across methods (such as filter, find, parents, parent, etc.)
> The documentation is very vague abo
5 matches
Mail list logo