Based on zeptojs, encapsulation of a back top plug
Import file
<script src="zepto.min.js"></script>
<script src="backToTop.js"></script>
then
$('.element').backToTop({
type:'doubleTap',
duration:500,
target:100
})
options
git clone https://github.com/itstrive/backToTop.git
bower install tinyBack
npm install tiny-back -D
If you have any questions, please contact me.
MIT
https://www.npmjs.com/package/tiny-back