I’m using the Tab Slide Out Jquery plugin.
http://wpaoli.building58.com/2009/09/jquery-tab-slide-out-plugin/
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
});
});
Here’s my 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;
}
Your problem is tabHandle: ‘.handle
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