2011-08-12 5 views
0

私はjquery tabSlideOutスライダを使用していますが、うまく動作していますが、ページのどこにでも配置する必要がありますが、そのようなタイプの機能はありません。 tabLocationのように使用できるプロパティは1つだけです。 'left'tabSlideOutというjqueryスライダを配置する方法

$(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 
     }); 
    }); 

tablocationの値は固定されています。だから私の要件に応じてtabSlideOutスライダの位置を決めるコードを変更する必要があることを私に教えてください。コードで私を助けてください。タブが固定されている場所を選択することができ感謝

答えて

0

、プロパティを使用して "tabLocation"

  • 値: "トップ" は、 "左"、 "右"、 "下"

そして、 "leftPos"(tabLocationが "bottom"または "top"の場合)または "topPos"(tabLocationが "left"または "right"の場合)のプロパティを使用して配置できます。

あなたは200pxの「トップ」の下に、ページの右側にタブを入れたい場合たとえば、あなたが使用する必要があります:

$(function() { 
    $('.slide-out-div').tabSlideOut({ 
     tabLocation: 'right', 
     topPos: '200px', 
    }); 

は});

タブはページの境界線で固定する必要があり、これらの2つのプロパティを正しく設定することができます。あなたが本当にどこにでも配置したいなら、他のプラグインを使う必要があります(または負のマージンを設定するなど)。

+0

これがあなたの質問を解決したら、それを受け入れたとマークしてください!ありがとう! –

関連する問題