Hi folks,

I'm hoping for some help/direction in a problem I'm having with some
tab switch code (originally presented @ 
http://www.mind4m.com/stories.php?pageid=10)
that I've introduced onto a test page @ 
http://rudderlive.bito.org.nz/employment_dev.asp

While the tab "a links" are working in so far as being correctly
selected and the appropriate CSS changes applied, the same is not true
for the divs holding the contents of each tab.  I'm sure the problem
is with the selectors, but I don't have the headspace to work out how
to debug the code to work out which elements are actually being
selected by the code.

The code being used is:
        $('ul.tabNav a').click(function() {
                var curChildIndex = $(this).parent().prevAll().length + 1;
                //console.log(curChildIndex);
                $(this).parent().parent().children('.current').removeClass
('current');
                $(this).parent().addClass('current');
                $(this).parent().parent().next('.tabContainer').children
('.current').fadeOut('fast',function() {
                        $(this).removeClass('current');
                        
$(this).parent().children('div:nth-child('+curChildIndex+')').fadeIn
('normal',function() {
                                $(this).addClass('current');
                        });
                });
                return false;
        });
});

Any help will be appreciated a lot

THanks,

Bruce

Reply via email to