我正在使用Tab Slide Out Jquery插件. wpaoli.building58/2009/09/jquery-tab-slide-out-plugin/
I'm using the Tab Slide Out Jquery plugin. wpaoli.building58/2009/09/jquery-tab-slide-out-plugin/
我在左侧显示一个选项卡,但我想在右侧显示另一个独立的选项卡. 当我复制css,js和div的块时,将显示右侧的选项卡,但如果我激活右侧的选项卡,则只能激活左侧的选项卡.
I have one tab that appears on the left, but i wanted another independent tab on the right. When i duplicate the blocks of css, js and the div, the tab on the right appears but i can only activate the one on the left if i activate the one on the right.
联系人图像也仅显示在右侧,因此我只能激活右侧的选项卡. 我该如何编写代码,以便在一页上有多个标签并独立激活它们?
Also the contact image only appears on the right, so i can only activate the right tab. How can i code this so that i can have more than one tab on one page and activate them independently?
$(function(){ $('.slide-out-div').tabSlideOut({ tabHandle: '.handle', //class of the element that will be your tab pathToTabImage: 'images/contact_tab.gif', //path to the image for the tab (optionaly can be set using css) imageHeight: '122px', //height of tab image imageWidth: '40px', //width of tab image tabLocation: 'left', //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: '200px', //position from the top fixedPosition: false //options: true makes it stick(fixed position) on scroll }); $('.slide-out-div-apps').tabSlideOut({ tabHandle: '.handle', //class of the element that will be your tab pathToTabImage: 'images/contact_tab.gif', //path to the image for the tab (optionaly can be set using css) imageHeight: '122px', //height of tab image imageWidth: '40px', //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: '200px', //position from the top fixedPosition: false //options: true makes it stick(fixed position) on scroll }); });这是我的CSS
.slide-out-div { padding: 20px; width: 250px; background: #f2f2f2; border: #29216d 2px solid; } .slide-out-div-apps { padding: 20px; width: 250px; background: #f2f2f2; border: #29216d 2px solid; }推荐答案
您的问题是tabHandle:'.handle
Your problem is tabHandle: '.handle
要解决此问题,请为每个.handle添加另一个类,例如,您可以使用.handle.first和.handle.second
To solve this add another class to each .handle so for instance you could have .handle.first and .handle.second
这样,每个触发器都是唯一的.干杯
This way each trigger is unique. Cheers
更多推荐
使用jQuery滑出选项卡
发布评论