javascript - jQuery interfering with other jQuery scripts -
I am working on a particularly heavy jQuery site that has many animations
it The script controls which background clouds (6 of them):
function conduction cloud (E, S, D) {$ (E). CSS ('left', '-20%'); Var wait = window.setTimeout (function () {$ (e) .animate ({right: '120%'}, 'linear', function () {moveclouds (e, s, d);});}, d ); } If (! ModernizeR.Cashation) {var clouds = [1,2,3,4,5,6]; $ .eE (cloud, function) (var e = $ ('. Cloud-' +); conduction cloud (e, e dita ('speed'), idata ('delay'));); } There is someone who moves the balloons and other elements (12 of them):
function run it (element, hover emount) {element . Animate ({top: '+ =' + hovermount}, 1000); Element.animate ({top: '- =' + hoverAmount}, 1000, function () {runIt (element, hoverAmount);}); } $ ('Balloon'). Each (function () {var hovermount = 15+ Math.flur (Math.rendum () * 5); //console.log (candidate amount); run ($ (this), hovermount);}; And the other objects that move, fade in and out of them.
The problem is now with more content which adds images of clouds and balloons, now jerky and no longer smooth. I am very new to jQuery so that my question is:
Is there any way to fight them? Use less resources and run smoothly? Like the above comments here, using jQuery for complex complex simultaneous animations is not the best way to do this.
JISCOC uses CSS conversion to move objects around. You can also do your own CSS conversion. They use hardware acceleration and make your objects very fast and smooth.
Comments
Post a Comment