>         var nextElements=$(element).descendants();// returns everythign that

This would return all children of the element, not siblings.

On Oct 10, 4:26 am, "Alex McAuley" <webmas...@thecarmarketplace.com>
wrote:
> If you use "Event" with element you can find the element that was clicked
>
> $$('.blah').each(function(e) {
>    $(e).observe('click',function(event){
>    var element=Event.element(event); // this is the element
>         var nextElements=$(element).descendants();// returns everythign that
> is a
>
>   });
>
> });
>
> This is untested. Your list is a straight list of divs so it may not work -
> but try it and see!..
>
> HTH
>
> Alex Mcauley
>
> http://www.thevacancymarket.com
>
> ----- Original Message -----
> From: "patrick" <patrick99...@gmail.com>
> To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com>
> Sent: Saturday, October 10, 2009 8:41 AM
> Subject: [Proto-Scripty] how to select all elements by class after a certain
>
> point?
>
> > Hi everyone,
>
> > I am a bit stuck on this..  So, I have a layout with something like
> > this:
>
> > <div class="blah">blah</div>
> > <div class="blah">blah</div>
> > <div class="other_class"></div>
> > <div class="blah">blah</div>
> > <div class="blah">blah</div>
> > <div class="blah">blah</div>
> > <div class="other_class"></div>
> > <div class="blah">blah</div>
>
> > ...  I have a function that is called when one of my '.blah' divs is
> > clicked, and so in that function  'this' refers the particular div..
> > I am trying to figure out how I can get all of the divs that are
> > '.blah' after 'this'...
>
> > Thank you.
>
> > -patrick
--~--~---------~--~----~------------~-------~--~----~
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-scriptaculous@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