目前,我有这个,但它一直返回“swapBKgnd是没有定义”:jQuery如何正确设置间隔?
var interval = self.setInterval("swapBKgnd()", 9000);
function swapBKgnd() {
(direction === 'next') ? ++current : --current;
if (current === 0) {
current = imgsLenth;
direction = 'next';
} else if (current - 1 === imgsLenth) {
current = 1;
loc = 0;
}
transition(sliderUL, loc, direction);
};
感谢。
尝试function' :) –
变种的时间间隔后'申报'VAR interval' =的setInterval( swapBKgnd,9000); –
删除'swapBKgnd()'中的引号。 – karthikr