jQuery animate() and browser performance

后端 未结 7 705
小蘑菇
小蘑菇 2020-12-03 09:48

I\'ve got some elements that I\'m moving across the page very slowly. Essentially, I\'m decreasing the left margin of two images over a span of 40 seconds or so.

Vi

7条回答
  •  旧巷少年郎
    2020-12-03 10:30

    I just watched the performance of animation under Scriptaculous, and found similar CPU spikes: roughly 50% for IE, slightly better performance (16-30%) for Firefox -- both on a DuoCore PC. Since both JQuery and Scriptaculous work by changing the underlying CSS, I think it's safe to say that any Javascript implementation is going to be computationally expensive.

    You may well be stuck going with Flash.

提交回复
热议问题