Animate function causing error


#1

Scrolling to the top of the page with this code

$$('html,body').animate({scrollTop: 0}, 0);

causes an error:

Uncaught TypeError: $$1$1.extend is not a function

Is there any fix or workaround for that error?


#2

animate have a bug
post an issue on gitHub


#3

It is fixed in latest Dom7. But it useless to animate scrollTop on html,body in F7. Use scrollTop instead:

$$('.page-content').scrollTop(0);