我使用jquery tabSlideOut滑块,它运行得很好,但是我需要将它放在页面的任何位置,但是没有这种类型的工具。只有一个属性可用,如tabLocation:“左”
$(function () {
$('.slide-out-div').show();
$('.slide-out-div').tabSlideOut({
tabHandle: '.handle', //class of the element that will become your tab
pathToTabImage: 'Images/feed_back.png', //path to the image for the tab //Optionally can be set using css
imageHeight: '122px', //height of tab image //Optionally can be set using css
imageWidth: '40px', //width of tab image //Optionally can be set using css
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/ use if tabLocation is left or right
leftPos: '20px', //position from left/ use if tabLocation is bottom or top
fixedPosition: false,
onLoadSlideOut: false //options: true makes it stick(fixed position) on scroll
});
});但是表的值是固定的。因此,请指导我需要更改的代码,以定位tabSlideOut滑块根据我的要求。请帮我处理密码。谢谢
发布于 2012-03-02 04:17:27
您可以使用属性"tabLocation“选择选项卡的固定位置。
然后,您可以使用属性"leftPos“( tabLocation是”底部“或"top")或"topPos”(当tabLocation是“左”或“右”)来定位它。
例如,如果您想将选项卡放在页面的右边,200 of位于"top“下面,则需要使用:
$(function () {
$('.slide-out-div').tabSlideOut({
tabLocation: 'right',
topPos: '200px',
});});
选项卡必须固定在页面边框上,并且可以很好地设置这两个属性。如果你想把它定位到任何地方,你需要使用其他插件,或者做一些CSS技巧(比如设置负边距)。
https://stackoverflow.com/questions/7039125
复制相似问题