這樣寫(xiě)就不會(huì)出現(xiàn)你們說(shuō)的問(wèn)題了
next.onclick = function(){
if (!isAnimate) {
index += 1;
showBtn();
animate(-600);
}
}
next.onclick = function(){
if (!isAnimate) {
index += 1;
showBtn();
animate(-600);
}
}
2017-02-27
字符串-數(shù)字 可以自動(dòng)轉(zhuǎn)化成數(shù)字
但是字符串+數(shù)字轉(zhuǎn)化為字符串
但是字符串+數(shù)字轉(zhuǎn)化為字符串
var olist = $('.list');
setInterval(function(){
var nleft = parseInt($('.list')[0].style.left) - 600;
olist.animate({left:nleft}, 400, function(){
if(nleft <= -2400 ){
nleft = '-600px';
}
else {
nleft = nleft + 'px';
}
$('.list')[0].style.left = nleft;
})
},2000)
setInterval(function(){
var nleft = parseInt($('.list')[0].style.left) - 600;
olist.animate({left:nleft}, 400, function(){
if(nleft <= -2400 ){
nleft = '-600px';
}
else {
nleft = nleft + 'px';
}
$('.list')[0].style.left = nleft;
})
},2000)
2017-02-20
老師講的很好,對(duì)我啟發(fā)很大,之前有很多不太明白的地方,現(xiàn)在基本上都清楚了,給老師個(gè)大贊
2017-02-16
不明白的同學(xué)還可以去看這篇文章,http://www.cnblogs.com/LIUYANZUO/p/5679753.html
2017-02-14