当我点击一个按钮(标签)打开另一行标签然后再打开内容框时,如何创建这个垂直标签? 这几乎是结果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>
答案 0 :(得分:1)
This example is good,只需更改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;
}