我使用Tab Slide Out Jquery插件。 http://wpaoli.building58.com/2009/09/jquery-tab-slide-out-plugin/使用jQuery滑出標籤 - 需要多個
我有一個標籤出現在左邊,但我想要另一個獨立的標籤在右邊。 當我複製css,js和div的塊時,右邊的標籤出現,但是我只能激活左邊的那個,如果我激活右邊的那個。
此外,聯繫人圖片只出現在右側,所以我只能激活正確的選項卡。 我如何編碼這個,以便我可以在一個頁面上有多個選項卡並獨立激活它們?
$(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;
}
嗨,你有沒有得到這個工作?我也有同樣的問題。請讓我知道你是如何解決它的。謝謝 –
嗨 - 是的,我得到了這個工作。你想讓我在這裏發佈解決方案嗎? –