JS: Non UX Intrusive way to stop Mobile Scroll

Check this out homies,
A slick JS way to stop iOS (and other devices that use touch) from scrolling


        // Disable scrolling.
        document.ontouchmove = function (e) {
            e.preventDefault();
        }
        // Enable scrolling.
        document.ontouchmove = function (e) {
            return true;
        }

Leave a Reply

Your email address will not be published. Required fields are marked *