[Proto-Scripty] Re: how to select all elements by class after a certain point?
Matt. Evidently i have said somehting in a previous post to upset you. This group is not for taking digs at people Lose the arrogance and grow up. I trust this will end any more childishness on your part Regards Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Matt Foster mattfoste...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Monday, October 12, 2009 10:19 PM Subject: [Proto-Scripty] Re: how to select all elements by class after a certain point? Hence the note on it This might not work as its divs. The name of the elements have no weight on the issue. The structure of the elements are all that matters. Siblings != Children You should have added the disclaimer... This does not work... On Oct 12, 3:04 pm, Alex McAuley webmas...@thecarmarketplace.com wrote: Hence the note on it This might not work as its divs. Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Matt Foster mattfoste...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Monday, October 12, 2009 7:12 PM Subject: [Proto-Scripty] Re: how to select all elements by class after a certain point? 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=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/div div class=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: how to select all elements by class after a certain point?
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=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/div div class=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: how to select all elements by class after a certain point?
Hence the note on it This might not work as its divs. Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Matt Foster mattfoste...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Monday, October 12, 2009 7:12 PM Subject: [Proto-Scripty] Re: how to select all elements by class after a certain point? 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=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/div div class=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: how to select all elements by class after a certain point?
Hence the note on it This might not work as its divs. The name of the elements have no weight on the issue. The structure of the elements are all that matters. Siblings != Children You should have added the disclaimer... This does not work... On Oct 12, 3:04 pm, Alex McAuley webmas...@thecarmarketplace.com wrote: Hence the note on it This might not work as its divs. Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Matt Foster mattfoste...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Monday, October 12, 2009 7:12 PM Subject: [Proto-Scripty] Re: how to select all elements by class after a certain point? 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=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/div div class=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: how to select all elements by class after a certain point?
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=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/div div class=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: how to select all elements by class after a certain point?
Well the way I was trying to do it was proving to be too complicated.. So I changed my html a little bit. Now I am doing: div class=container div class=blahsomething/div /div div class=container div class=blahsomething/div div id=me class=blahsomething/div div class=blahsomething/div /div div class=container div class=blahsomething/div div class=blahsomething/div /div div class=container div class=blahsomething/div /div So, from $('me') -- how can I get all of the 'div.container's that happen after it? I know I can do: $('me').up('.container').next() and get the one after it-- but my layout is dynamic and I need to be able to get all of the containers after $('me') regardless of how many there are. -patrick On Oct 10, 1: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=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/div div class=blahblah/div div class=blahblah/div div class=other_class/div div class=blahblah/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 -~--~~~~--~~--~--~---