페이지 스크롤 금지

3059 단어
  /**
         * ( ) 
         * @method disableScroll
         * @chainable
         */
        disableScroll: function() {
            docElem.detach('touchmove', this._preventScroll);
            docElem.on('touchmove', this._preventScroll);
            
            if (isHuaweiP6) {
                docElem.addClass('m-mask-disable-scroll');
                bodyElem.addClass('m-mask-disable-scroll');
            }
            
            docElem.addClass('m-mask-disabled');
            
            return this;
        },
        
        /**
         * ( ) 
         * @method enableScroll
         * @chainable
         */
        enableScroll: function() {
            docElem.detach('touchmove', this._preventScroll);
            
            if (isHuaweiP6) {
                docElem.removeClass('m-mask-disable-scroll');
                bodyElem.removeClass('m-mask-disable-scroll');
            }
            
            docElem.removeClass('m-mask-disabled');
            
            return this;
        },


 /**
         *  
         * @method _preventScroll
         * @param {EventFacade} e  
         * @protected
         */
        _preventScroll: function(e) {
            e.preventDefault();
        },
        

좋은 웹페이지 즐겨찾기