私は、次のjQueryコードを持っている:私は20%selectedBoxスケールがでキックするのは非常に緩慢であることを発見していjqueryスケール効果が遅いですか?
$(document).ready(function() {
$('.box').click(function(){
var selectedBox = $(this),
selectedBoxLocationX = selectedBox.offset().left,
selectedBoxLocationY = selectedBox.offset().top;
selectedBox.animate({left:-selectedBoxLocationX, top:-selectedBoxLocationY},600).addClass('current');
otherBoxes = $('.box:not(.current)');
otherBoxes.animate({left:2000},600);
selectedBox.effect('scale', {percent:500, direction: 'vertical'}, 1000);
selectedBox.click(function(){
selectedBox.effect('scale', {percent:20, direction: 'vertical'},200);
otherBoxes.animate({left:0},600);
selectedBox.animate({top: 0, left: 0},700).removeClass('current');
});
});
});
を実際に selectedBoxアニメーション後をスケーリングします。
誰でもこの現象がなぜ起こっているのか教えていただけますか?
MTIA!
jsfiddleで例を挙げてください。 – Niklas
ありがとうNiklas - http://jsfiddle.net/sk62Y/ – circey