开发者

Variable not evaluating in JavaScript?

Can anyone tell me how do this? They are already integers, so I'm not sure what to tr开发者_JAVA技巧y...

var lrgSlideShow = {
    activeClass: 'active',
    wrapperClass: 'slideshow-widget-large',
    pauseLength: 2000,
    fadeLength: 1000
}

setInterval(changeImg,lrgSlideShow.pauseLength+lrgSlideShow.fadeLength);


The interval calc (lrgSlideShow.pauseLength+lrgSlideShow.fadeLength) is correct. Maybe changeImg is not invoking as expected?

Another thought: Do the var declaration and the setInterval invocation share the same functional scope? If not then setInterval may be unable to find lrgSlideShow or finding the wrong one

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜