Touchup () { var start = 0 ; let that = this; document.addEventListener("touchstart",function(e){ startY = e.changedTouches[0].pageY; },false); document.addEventListener ( "touchMove", function (E) { var endY e.changedTouches = [0 ] .pageY; var changeVal = endY - the startY is; IF (endY <the startY is) { // slide up // the console.log ( " up slip "); that.showSearchFlag = to false } the else IF (endY> the startY is) { // slides down // the console.log (" slid down "); that.showSearchFlag = to true } the else { // the console.log ( "no offset"); } // Get the screen height var A = || document.documentElement.scrollTop document.body.scrollTop ;; // height of the scroll bar var B = document.documentElement.clientHeight // visible area height var C = $ ( '# ListIndex') height ();. // the total height of the document IF (a + B> = C) { // represents browser has reached the bottommost that.showSearchFlag = to true } },false); },