i use jquery tabSlideOut slider and it is running fine but i need to position it anywhere in the page but there no such type of facility. there is only one property available like tabLocation: 'left'
$(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 开发者_Go百科 //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
});
});
but tablocation value is fixed. so please guide me what i need to change in the code to position tabSlideOut slider according to my requirement. please help me with code. thanks
You can choose where the tab is fixed, using the property "tabLocation"
- values: "top", "left", "right", "bottom"
And then, you can position it, using the properties: "leftPos" (when tabLocation is "bottom" or "top") or "topPos" (when tabLocation is "left" or "right").
For example, if you want to put the tab on the right of the page, 200px below the "top", you will need to use:
$(function () {
$('.slide-out-div').tabSlideOut({
tabLocation: 'right',
topPos: '200px',
});
});
The tab must be fixed on the page border, and it works fine setting these two properties. If you want to position it really anywhere you will need to use other plugin, or do some CSS tricks (like setting negative margins).
精彩评论