1 document.querySelector('body').addEventListener('touchmove', function(e) { 2 if (!document.querySelector('ul').contains(e.target)) { 3 e.preventDefault(); 4 } 5 })