1
我有一個奇怪的問題在這裏,更有趣的是,它工作正常jquery版本1.5.2和不在版本1.4.3。jquery動畫問題
所以,我要放下了一塊這裏的代碼:
$('.slides .items').animate({
left: number + 'px'
}, 500, 'swing');
這裏是HTML的一個項目:
<div class = 'slides'>
<div class = 'items'>
<div class = 'item' style = 'background: url(img/slides/slide-1919.jpg) no-repeat;'>
<div class = 'nav'>
<div class = 'back link' onclick = 'changeSlide(-1);'></div>
<div class = 'forward link' onclick = 'changeSlide(1);'></div>
</div>
<div class = 'title'><span class = 'textBuffer'>1919</span></div>
<div class = 'contentTitle'><span class = 'textBuffer'>The first Loblaw <em>Groceterias</em> store opens in Toronto</span></div>
<div class = 'content'><span class = 'textBuffer'>The new self-serve, cash-and-carry concept of grocery retailing is a big hit with customers, who take advantage of quality goods at lower prices. Within a decade, the Loblaw chain expands to more than 70 stores in Ontario alone.</span></div>
</div>
........
</div>
</div>
所以,當這number>1000px
動畫似乎循環的從乞討的整個項目再次,直到要進入正確的位置
我不知道如果1000px造成的問題,或者這是巧合。
有人見過這種問題,如果有可能解決這個問題。或者我殺了這個'有生命的'?
謝謝!
如果它工作正常,在1.5.2爲什麼你想開發舊版本? – wdm 2011-04-17 21:48:45
我不能升級到1.5.2,在我的情況下,我必須使用舊版本 – AlexC 2011-04-17 21:54:22
@alexander,我不認爲有任何問題的版本的jQuery,它的主要是你的HTML或代碼的一些問題...發佈你的HTML也 – kobe 2011-04-17 22:27:43