OH!! Really thanks for that. I got my answers now.

On Feb 24, 7:21 am, green <greenlaw...@gmail.com> wrote:
> Hi that's the CSS3 selection rule. You might google css selection rule for
> some references.
>
> For your specific case: "[]" defines the rule to match the element
> attribute; ^ before = means NOT. So that expression will pick up all <area>
> element which "rel" attribute is not "lightbox"
>
> On Wed, Feb 24, 2010 at 9:43 AM, rocksoccer <rocksoccer2...@gmail.com>wrote:
>
> > Hi,
> > I am new to js prototype. This may be a very easy question.
>
> > In lightbox 2 (http://www.huddletogether.com/projects/lightbox2)
> > code,  I find the following code I cannot understand. Please help to
> > explain it.
>
> > var target = event.findElement('a[rel^=lightbox]') ||
> > event.findElement('area[rel^=lightbox]');
> >            if (target) {
> >                event.stop();
> >                this.start(target);
> >            }
>
> > It is easy to understand "findElement('a')", but what does it mean by
> > the square brackets, as well as ^ just before equal? Is this a little
> > bit of regular expression?
>
> > I don't find any document about this on prototype website.
>
> > Thanks in advance
> > Rocksoccer
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Prototype & script.aculo.us" group.
> > To post to this group, send email to
> > prototype-scriptacul...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to