|
@@ -18,10 +18,9 @@ $(function(){
|
|
|
playpre();
|
|
|
})
|
|
|
var curidx =0;
|
|
|
- var mov = 1;
|
|
|
- var lock=false;
|
|
|
+ var mov = 1;
|
|
|
function playnext(){
|
|
|
- $ct.animate({marginLeft:'-='+mov*imgWidth},function(){
|
|
|
+ $ct.animate({marginLeft:'-='+mov*imgWidth},1000,function(){
|
|
|
curidx+=mov;
|
|
|
if(curidx===imgCount){
|
|
|
$ct.css({marginLeft:0-imgWidth});
|
|
@@ -31,11 +30,11 @@ $(function(){
|
|
|
$('.index_tt .banner_txt').eq(curidx).show().siblings().hide();
|
|
|
}
|
|
|
function playpre(){
|
|
|
- $ct.animate({marginLeft:'+='+mov*imgWidth},function(){
|
|
|
+ $ct.animate({marginLeft:'+='+mov*imgWidth},1000,function(){
|
|
|
curidx-=mov;
|
|
|
if(curidx<0){
|
|
|
$ct.css({marginLeft:0-imgWidth*imgCount});
|
|
|
- curidx=2;
|
|
|
+ curidx=imgCount-1;
|
|
|
}
|
|
|
})
|
|
|
$('.index_tt .banner_txt').eq(curidx).show().siblings().hide();
|