2011-10-23 45 views
0

Plz看到下面的鏈接, http://www.beta.storeji.in/ 當圖像滑動時,下一張圖像將不會出現滑動,直到完成滑動並顯示空白而不是圖像。如何解決這個問題?我的圖像滑塊有空白

這是我的滑塊javascript代碼

function slide() 
{ 
    if($('.current').is(':last-child')){ 
     $('.current').removeClass('current'); 
     $('#imgholder img:first-child').addClass('current'); 
     $('#imgholder').animate({left: '0px'}); 
    } 
    else{ 
     $('.current').removeClass(function(){ 
      $(this).next().addClass('current'); 
      return 'current'; 
     }); 
     $('#imgholder').animate({left: '-=980'},{duration: 'slow', easing: 'easeOutBounce' }); 
     } 
} 
var loop_handle= setInterval("slide()",'5000'); 
+0

嘗試使左:「 - = 980" 左:」 = - 980" – albert

+0

@albert,我不反對別人學習新的東西,但也許只是OP沒有意識到這輪早已被髮明。 – Sparky

+0

我發現創建自己的模塊比使用模塊更容易 – pahnin

回答

2

您有一個錯誤在你picslider.css片,寬度和高度都設置不正確;

#imgholder{ 
    position: absolute; 
    width: 5880; 
    height: 490; 
    z-index: 0; 
} 

解決方案,它應該工作正常。

固定。

#imgholder{ 
    position: absolute; 
    width: 5880px; 
    height: 490px; 
    z-index: 0; 
}