首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在一个页面上切换多个tabSlideOUt选项卡

如何在一个页面上切换多个tabSlideOUt选项卡
EN

Stack Overflow用户
提问于 2015-05-18 04:32:47
回答 1查看 548关注 0票数 0

我需要使用多个tabSlideOUt 来源,其中一个页面以类似的方式使用,如小提琴例子所示

我需要在选项卡之间切换,每次只能打开一个。

代码语言:javascript
复制
 $(function () {
     $('.slide-out-div').tabSlideOut({
         tabHandle: '.handle', //class of the element that will be your tab
         pathToTabImage: 'http://www.gac.com/upload/GAC2012/images/facebook_icon_50x50.png', //path to the image for the tab (optionaly can be set using css)
         imageHeight: '50px', //height of tab image
         imageWidth: '50px', //width of tab image    
         tabLocation: 'right', //side of screen where tab lives, top, right, bottom, or left
         speed: 300, //speed of animation
         action: 'click', //options: 'click' or 'hover', action to trigger animation
         topPos: '50px', //position from the top
         fixedPosition: false //options: true makes it stick(fixed position) on scroll
     });


 });
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-05-18 05:17:46

我通过对HTML进行一些修改并使用更新的js来解决这个问题。用过的js,在小提琴上的,否则它可能会断。

http://fiddle.jshell.net/zy62umw5/1/

代码语言:javascript
复制
<div class="slide-out-div tab"> <a class="handle" href="http://link-for-non-js-users">Content</a>

     <h3>Contact me</h3>
 <a href="mailto:wpaoli@gmail.com">wpaoli@gmail.com</a>

    <br />
    <br />
    <p>Thanks for checking out my jQuery plugin, I hope you find this useful.</p>
    <p>This can be a form to submit feedback, or contact info</p>
</div>
<div class="slide-out-div tab2"> <a class="handle" href="http://link-for-non-js-users">Content</a>

     <h3>Contact me</h3>
 <a href="mailto:wpaoli@gmail.com">wpaoli@gmail.com</a>

    <br />
    <br />
    <p>Thanks for checking out my jQuery plugin, I hope you find this useful.</p>
    <p>This can be a form to submit feedback, or contact info</p>
</div>
<div class="slide-out-div tab3"> <a class="handle" href="http://link-for-non-js-users">Content</a>

     <h3>Contact me</h3>
 <a href="mailto:wpaoli@gmail.com">wpaoli@gmail.com</a>

    <br />
    <br />
    <p>Thanks for checking out my jQuery plugin, I hope you find this useful.</p>
    <p>This can be a form to submit feedback, or contact info</p>
</div>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30295149

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档