2011-01-25 8 views
0

jQuery anythingSliderを使用してコンテンツを回転しています。スライダの下にある小さなタブをクリックして、スライダ全体の表示を切り替えることができます。私はスライダー全体をラップするdivに、jQuery animate()関数を使用しています。私がこれをすると、それは何もスライダの矢を無効にします、それが私の問題です。 divラッパーからアニメーション機能を削除すると、anythingSliderの矢印が再び機能します。 anythingSliderをdiv内に配置してjQueryのアニメーション機能を適用して問題があると感じています。誰でもこれを確認できますか?もしそうなら、私は何かの表示を切り替えることができる別の方法は何ですか?スライダー?anythingSlider()を含むパネルでjQuery animate()に問題が発生しました

ここで、それはあなたが、私は矢印が動作していないとのことだ問題を見ることができますjsFiddleである:http://jsfiddle.net/brianmcculloh/H2hPQ/3/

HTML:

<div id="slider-wrapper">    
<div id="slider">   
     <div class="wrapper"> 
      <ul> 
       <li> content... </li> 
       <li> content... </li> 
       <li> content... </li> 
       <li> content... </li> 
       <li> content... </li> 
       <li> content... </li> 
      </ul> 
     </div> 
<div class="bottom">&nbsp;</div> 
</div></div> 



<div id="slider-tab"> <!-- the tab that toggles the slider panel --> 
    <div onclick="showslider()" id="slider-button"> 
     <a title="Toggle this panel">toggle</a> 
</div></div> 

Javascriptを:

function showslider() { 
     $('#slider-wrapper').animate({ 
      opacity: 'toggle', 
      height: 'toggle',    
      }, 300, 'linear'); 
    } 

$(document).ready(function() { 

     function formatText(index, panel) { 
      return index + ""; 
     } 

     //SLIDER 
     $('#slider').anythingSlider({ 
      easing: "easeInOutExpo",  // Anything other than "linear" or "swing" requires the easing plugin 
      autoPlay: true, // This turns off the entire FUNCTIONALY, not just if it starts running or not. 
      delay: 3000, // How long between slide transitions in AutoPlay mode 
      startStopped: false,   // If autoPlay is on, this can force it to start stopped 
      animationTime: 600,    // How long the slide transition takes 
      hashTags: false,     // Should links change the hashtag in the URL? 
      buildNavigation: false,   // If true, builds and list of anchor links to link to each slide 
      pauseOnHover: true,    // If true, and autoPlay is enabled, the show will pause on hover 
      startText: "Go",    // Start text 
      stopText: "Stop",    // Stop text 
      navigationFormatter: formatText  // Details at the top of the file on this use (advanced use) 
     }); 
    }); 
+0

JSFiddle.netでいくつかのコード、または(非)作業サンプルを見ていただければ幸いです。 – Dutchie432

+0

ありがとう、私はそれを追加しました。 –

+0

ここはjsFiddleにあります - きちんとしたサービス! http://jsfiddle.net/brianmcculloh/H2hPQ/3/ –

答えて

0

をしなければなりませんでした移動:

<div class="bottom">&nbsp;</div> 

スライダーdivの外側そのマークアップは矢印の機能性を台無しにしていた。

関連する問題