Vertical Tabs with JQuery?

前端 未结 8 1821
一向
一向 2020-11-29 17:15

I want tabs along the left side of the page instead of across the top. I\'m already loading jQuery for other reasons (effects), so I prefer using jQuery to another UI frame

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 17:54

    I've created a vertical menu and tabs changing in the middle of the page. I changed two words on the code source and I set apart two different divs

    menu:

     
    

    content:

    CONTENT 1
    CONTENT 2

    the code works with the div apart

    $(function () {
        var tabContainers = $('div.pages > div');
    
        $('div.arrowgreen ul.tabNavigation a').click(function () {
            tabContainers.hide().filter(this.hash).show();
    
            $('div.arrowgreen ul.tabNavigation a').removeClass('selected');
            $(this).addClass('selected');
    
            return false;
        }).filter(':first').click();
    });
    

提交回复
热议问题