$('#somediv').stop(false, true)
.animate({marginLeft: '-=' + e.width() + 'px'}, options.speed, function(){ options.onNewSlide() })
e.with()
收益640options.speed
包含800options.onNewSlide()
包含了一個自定義的回調函數
它工作正常,在Firefox。但我用jQuery-Lint調試它,因爲它在IE中拋出一些隨機錯誤。林特告訴我:jQuery的動畫()的問題(語法?)
When I called animate(...) with your args, an error was thrown! TypeError: c.speed is not a function { message="c.speed is not a function", more...}
You passed: [Object { marginLeft="-=640px"}, 800, function()]
它表明我已發佈的行。 我檢查了jQuery文檔,但我的語法接縫確定。
你知道我在做什麼錯嗎?
PS:我使用jQuery 1.4.2從谷歌API,你可以在這裏看到的錯誤:http://meodai.ch/slider/(我知道代碼是正在建設中,但仍然)
編輯: 我試圖重現我的錯誤在只有動畫的新文件中:http://meodai.ch/slider/index2.html那裏它工作得很好!現在我迷了路。
我已經追平這個,它同樣的錯誤 – meo 2010-04-26 13:11:46