ok, indeed in 1.2.1 the example works. But I still get the error when
I try to do something like
$('myDiv').match($('anotherDiv'));

(just to see if it returns 'false', of course.)

The thing I'd like to do matching two elements is basically find out
if a given element passed to my function (e.g. onclick="update
(this)" ) is contained in an array/collection of several elements.
Example:
http://pastebin.com/f4cce8e88

Any input about this?

On 7 Dic, 10:43, Jan Kassens <[EMAIL PROTECTED]> wrote:
> It was added with 1.2.1, so I suggest updating, as 1.2.1 should be a  
> drop in patch.
>
> Jan
>
> On Dec 7, 2008, at 3:41, Idiosuite wrote:
>
>
>
>
>
> > I took a look at the source myself and indeed seems not to be such
> > functionality.
> > thank you for your time!
>
> > On 7 Dic, 03:36, "Guillermo Rauch" <[EMAIL PROTECTED]> wrote:
> >> Well, to answer here on the mailing list I never look at the  
> >> documentation
> >> but I read the code directly.In this case, I looked at mootools-
> >> core-edge.js
> >> and I didn't notice this functionality.
>
> >> On Sun, Dec 7, 2008 at 12:33 AM, Idiosuite  
> >> <[EMAIL PROTECTED]>wrote:
>
> >>> Hi Guillermo,
> >>> thanks for your answer. But what about:
>
> >>>http://mootools.net/docs/Element/Element#Element:match
>
> >>> It states:
> >>> "match - can be a string or element
> >>>    * (string) The tag name to test against this element. If  
> >>> Selectors
> >>> is included, any single CSS selectors may also be passed.
> >>>    * (element) An element to match; returns true if this is the
> >>> actual element passed in."
> >>> and again in the following examples
> >>> "Using an Element:
> >>> var el = $('myDiv');
> >>> $('myDiv').match(el); //Returns true
> >>> $('otherElement').match(el); //Returns false"
>
> >>> Is it a wrong/out of date documentation (at least according to you)?
>
> >>> On 7 Dic, 03:12, "Guillermo Rauch" <[EMAIL PROTECTED]> wrote:
> >>>> That's not how match works. match expects a selector (string)It's
> >>> returning
> >>>> true because of the last line of the function:
>
> >>>> return (parsed) ? Selectors.Utils.filter(this, parsed, {}) :  
> >>>> *true*;
>
> >>>> since the selector is not being parsed (you're supplying an  
> >>>> element),
> >>> true
> >>>> is returned.
>
> >>>> --
> >>>> Guillermo Rauchhttp://devthought.com
>
> >> --
> >> Guillermo Rauchhttp://devthought.com
>
> --
> Jan - MooTools comitter
> twitter/blog:http://kassens.net

Reply via email to