jQuery automatic scroll / slideshow

Posted by tony noriega on Stack Overflow See other posts from Stack Overflow or by tony noriega
Published on 2010-05-11T19:47:54Z Indexed on 2010/05/11 19:54 UTC
Read the original article Hit count: 195

Filed under:
|
|

Could i modify this existing code to automatically scroll through the list items to display the content?

Sorry, the: ul li a {} links.

Maybe using "interval" method?

$(document).ready(function(){
    $('ul.tabNav a').click(function() {
        var curChildIndex = $(this).parent().prevAll().length + 1;
        $(this).parent().parent().children('.current').removeClass('current');
        $(this).parent().addClass('current');
        $(this).parent().parent().prev('.tabContainer').children('.current').fadeOut('fast',function() {
            $(this).parent().children('div:nth-child('+curChildIndex+')').fadeIn('fast',function() {
                $(this).addClass('current');
            });
            $(this).removeClass('current');
        });
        return false;
    });
});

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about auto