problem
Is developing a mobile web, using a relatively lightweight zepto.js, when moving the end chrome test, suddenly found Top of functional failure, there is no error, other browsers are run through, after solve recorded.
//这段代码在chrome移动端失效
$(document.body).scrollTop(0);
Solution
Have this problem change the following code
//将事件挂载到window对象上,就可以正常运行了
$(window).scrollTop(0);
other
Collating my own learning process read books and other books ready to watch, I want to help, the next will continue to update up new books:
JavaScript eBook Collection