strange, i was fighting against a bit of code where the selector
engine would not want to behave as i expected.
Out of ideas, i tried using the freshly released jquery 1.3 beta 2 and
it turns out the engine now works as i expected!

here is the incriminated code:

var $thisLI = $('#' + UI.section);
if ($thisLI.length > 0)
 {
                        var $thisMenu = $thisLI.parent();
                        var $thisA = $('a:first', $thisLI);
                        $('a.selected', $thisMenu).removeClass
('selected');
                        $thisA.addClass('selected');
                        var liIndex = $thisMenu.children('li').index
($thisLI[0]);
                        var newleft = 0 - (strataGrid.colWidth *
(liIndex + 1));
                        $thisLI.siblings().removeClass
('selected').addClass('notSelected');
                        $thisMenu.animate({ left: newleft }, 'slow',
function()
                        {
                            // this takes care of show/hiding menus
and submenus
                            $thisA.parents('li').removeClass
('notSelected').addClass('selected');
         });
}
I think the culprit is

$thisLI.siblings().removeClass('selected').addClass('notSelected');

as the modified DOM shows the "selected" class also in children LI's
inside that UL branch,

you can view it live here:
(click on "news")
http://www.pixeline.be/test/metalab/prototype/

and working correctly
http://www.pixeline.be/test/metalab/prototype/index_1.6b2.htm


Reply via email to