1

我如何制作这个垂直选项卡,当我单击一个按钮(选项卡)打开另一行选项卡然后才打开内容框?这几乎是http://jsfiddle.net/2jryD的结果,我找不到 1.4.2.min.js 库来链接它。我认为我应该在 html 和 js 中做一些更改,但我不知道是什么....你能帮帮我吗?

JS + 库

$(document).ready(function(){
        $("#textExample").verticaltabs({speed: 500,slideShow: false,activeIndex: 2});
        $("#imageExample").verticaltabs({speed: 1000,slideShow: true,slideShowSpeed: 3000,activeIndex: 0,playPausePos: "topRight"});
    });

html

<div class="verticalslider" id="textExample">
        <ul class="verticalslider_tabs">
            <li><a href="#">Lorem Ipsum</a></li>
            <li><a href="#">Praesent Pulvinar</a></li>
            <li><a href="#">Nunc Adipiscing</a></li>
            <li><a href="#">Praesent Dapibus</a></li>                        
        </ul>
        <ul class="verticalslider_contents">
         <li>
            <h2>Praesent Pulvinar</h2>
            <p>Praesent pulvinar, lorem nec ullamcorper semper, ipsum erat vestibulum lacus, in sodales lorem mi in leo. Vestibulum et rhoncus tellus. Curabitur mauris enim, vehicula sit amet euismod a, eleifend at dui. Vivamus sollicitudin, nunc pharetra porttitor lobortis, felis odio hendrerit mi, id ultricies urna enim quis lectus. Suspendisse convallis ipsum egestas velit fermentum ac volutpat dui dictum. </p></li>

        </ul>
    </div> 
4

1 回答 1

1

这个例子很好,只是改变css

.mydivContent {
    clear: none;
    margin: 0 0 0 124px;
    padding: 0;
    position: relative;
}

#tab .nav {
    clear: left;
    margin: 0 0 10px;
    overflow: hidden;
    position: absolute;
}

我让例子

于 2013-03-06T22:02:16.820 回答