nice one man
perfectly fits my needs.
thank you

On 7 Dic, 21:35, nutron <[EMAIL PROTECTED]> wrote:
> function(el){  if (myArray.contains(el)) ...
>
> }
>
> On Sun, Dec 7, 2008 at 5:48 AM, Idiosuite (via Nabble) <
> [EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
>
>
> > wrote:
>
> > 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]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1625208&i=0>>
> > 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]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1625208&i=1>>
> > 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]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1625208&i=2>>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]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1625208&i=3>>
> > 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
>
> > ------------------------------
> >  View message @
> >http://n2.nabble.com/Element.match-issues-tp1624097p1625208.html
> > To start a new topic under MooTools Users, email
> > [EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > To unsubscribe from MooTools Users, click here< (link removed) >.
>
> -----
> The MooTools Tutorial:  http://www.mootorial.comwww.mootorial.com
> CNET Clientside:  http://clientside.cnet.comclientside.cnet.com
> --
> View this message in 
> context:http://n2.nabble.com/Element.match-issues-tp1624097p1626434.html
> Sent from the MooTools Users mailing list archive at Nabble.com.

Reply via email to