Hi,

Thanks for writing in.  Can you create a minimal, self-contained test
case[1] that works with 1.6.0 but doesn't work with 1.6.1?  (I was
just going to do it, but I frankly don't know the nth-last-of-type
selector well enough.)  If you can replicate it with a simple self-
contained test case that does work with 1.6.0 but not 1.6.1, would you
open a ticket for this on Lighthouse[2]?

[1] http://proto-scripty.wikidot.com/self-contained-test-page
[2] https://prototype.lighthouseapp.com/projects/8886-prototype/overview

Thanks,
--
T.J. Crowder
tj / crowder software / com
www.crowdersoftware.com


On Sep 30, 6:56 pm, wid <matt.ml...@gmail.com> wrote:
> Here is my problem, I was using Prototype 1.6.0 and Scriptaculous
> 1.8.1 and decided it was time to upgrade to Prototype 1.6.1 and
> Scriptaculous 1.8.2. I have a snipet of code that used to work before
> upgrading I couldn't figure out why. Below is a my code, the first
> child function works but the last child seems to not work at all.  I
> didn't see any changes in the API for different ways of doing Each
> Loops or CSS Selectors.  Anyone got an idea?
>
>         var firstMenuItem = $$('#preview-accordion-menu.accordion
> div.accordion-toggle:first-child');
>         var lastMenuItem = $$('#preview-accordion-menu.accordion
> div.accordion-toggle:nth-last-of-type(1)');
>         firstMenuItem.each(function (element, index) {
>                 Event.observe(element, 'mouseover', function () {
>                         $('pg-nav-hover').removeClassName('panel-accordion');
>                         $('pg-nav-hover').addClassName('accordion-top-hover');
>                 });
>                 Event.observe(element, 'mouseout', function () {
>                         
> $('pg-nav-hover').removeClassName('accordion-top-hover');
>                         $('pg-nav-hover').addClassName('panel-accordion');
>                 });
>         });
>         lastMenuItem.each(function (element, index) {
>                 element.addClassName('last');
>                 Event.observe(element, 'mouseover', function () {
>                         $('pg-nav-hover').removeClassName('panel-accordion');
>                         
> $('pg-nav-hover').addClassName('accordion-bottom-hover');
>                 });
>                 Event.observe(element, 'mouseout', function () {
>                         
> $('pg-nav-hover').removeClassName('accordion-bottom-hover');
>                         $('pg-nav-hover').addClassName('panel-accordion');
>                 });
>         });
--~--~---------~--~----~------------~-------~--~----~
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