Ask for help on the moving end. After the finger slides up and down and releases, the element will slide a little distance inertia! ! ! ! ! !

  node.js, question
touchMoveSliderCateList = function(x, y){
 var $list = jqueryMap.$cateListUl,
 //Obtain the sliding distance of the user's finger
 offset = {
 x : x - stateMap.touchStartPos.x,
 y : y - stateMap.touchStartPos.y
 $ list.css ('transform',' translate 3d' (0px,' add (offset.y-math.abs (statemap.listoffset)) plus' px, 0px');

At present, I use the last position of tuchmove minus the starting position of touchstart to get the sliding distance of the user’s finger. during the user’s movement, I keep setting it on the element. it is no problem to move the element, but it feels too stiff. I hope that after my finger is released, I can move a little distance by inertia. how do I do it? ?

His handwriting habit may be a little tired, if you don’t mind, you can write it directly with someone else.iscroll

But if you don’t want to do it yourself, likeiosIt is quite easy on:ios-scrolling