我必须为 div 设置动画。我需要确保在单击按钮时旧的div 完全淡出,然后让新的div 淡入。
showNews: function() {
var start = this.counter * this.displayatonce;
var end = this.counter * this.displayatonce + (this.displayatonce - 1);
for (i=start; i<=end; i++) {
this.news.eq(i).fadeIn();
}
},
hideAllNews: function() {
this.news.fadeOut();
},
navigateNews: function() {
this.hideAllNews();
this.showNews();
},
我该怎么做?