Answer the question
In order to leave comments, you need to log in
Why is javascipt scrolling heavy on cpu?
Good afternoon, I ran into a problem on some projects that use automatic scrolling using javascript for animation or interface.
The way it will be a simple js code or the smoothdivscroll plugin, when you visit a page with content scrolling, the cooler starts to work actively.
Let's take an example of animation of the movement of the background with clouds:
$('.clouds').animate({ 'backgroundPosition': '100000px' }, 4000000, 'linear');
$('.scroll').smoothDivScroll(
{
hotSpotScrolling : false,
manualContinuousScrolling : true,
touchScrolling : true,
autoScrollingMode : 'onStart',
autoScrollingDirection : 'endlessLoopRight'
});
Answer the question
In order to leave comments, you need to log in
There is css animation for this. Well, or a more banal transition, it’s not clear what exactly is being animated for you.
Let's do it together! C!S!S! C!S!S! C!S!S!
Hey! Who shouted jQuery?! Get him out of the room!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question