2011-07-27 4 views
0

私はNathan Searles very nice Slides pluginで作業しています。jQuery Slides Plugin:1つのスライドのみが存在する場合、スライド画像が表示されません。

は、私がスライド表示の複数のダイナミックインスタンスとページを持っている:

一つだけの画像は、画像が表示されていないスライダーに存在しているhttp://hnoc.dreamhosters.com/dev/property_info.php?lot=22644。上記のリンクの最初のスライダにこの問題が表示されます。複数の画像が存在する場合は、すべて表示されます。http://hnoc.dreamhosters.com/dev/property_info.php?lot=22622

ここでは、最初のリンクの単一画像のコードを示します。

これは何か鐘を鳴らしますか?エラーがありますか?

何かアドバイスをいただければ幸いです。

<div id="container1"> 
<div id="slides1"> 
<div class="slides_container"> 
<div class="slides_control"> 
<div class="slide" style=""> 
<a href="images/intermediate/I014N1013.jpg" rel="lightbox" title="Title: Plan of eight lots of ground with the buildings and improvements thereon..."> 
<img class="content" src="images/covers/C014N1013.jpg" alt="C014N1013.jpg"></a> 
<div class="caption" style="bottom: 0px; ">Plan of eight lots of ground with the buildings and improvements thereon... </div> 
</div> <!-- slide --> 
</div> <!-- slides_control --> 
</div> <!-- slides_container --> 
<a href="#" class="prev"><img src="js/slides/img/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a> 
<a href="#" class="next"><img src="js/slides/img/arrow-next.png" width="24" height="43" alt="Arrow Next"></a> 
</div> <!-- slides1 --> 
<img src="js/slides/img/example-frame.png" width="739" height="341" alt="Frame" id="frame1"> 
</div> 

答えて

1

編集slides.jquery.js

// after the variable setting on and after line 29 
var elem = $(this), 
control = $('.slides_control',elem), 
total = control.children().size(), 
... snip ... 
playInterval; 

それを解決

if (total == 1){   
    $('.'+option.container,elem).css({display:'block'});   
    // disable prev/next imgs 
    $('.'+option.prev+' img',elem).css({display:'none'}); 
    $('.'+option.next+' img',elem).css({display:'none'}); 
} 

を追加します。

平和。

0

スライド時間にこのSlides.js長さチェックコードがありません。できるだけコードを見直してください。

(this.data.current + 1 & &数をthis.data.animating!==)場合(this.data.total!= 1)以下JSでが

ファイル場合{を追加

  **if (this.data.total != 1) {** 

       if (next === -1) { 
        next = this.data.total - 1; 
       } 
       if (next === this.data.total) { 
        next = 0; 
       } 
       ............. 

      } 
     **}** 
    }; 
関連する問題