Showing
3 changed files
with
7 additions
and
14 deletions
@@ -1743,7 +1743,7 @@ function stopPropagation(e){ | @@ -1743,7 +1743,7 @@ function stopPropagation(e){ | ||
1743 | // return false; | 1743 | // return false; |
1744 | }**/ | 1744 | }**/ |
1745 | 1745 | ||
1746 | -var disableScroll = function(){ | 1746 | +/**var disableScroll = function(){ |
1747 | $(document).on('mousewheel', preventDefault); | 1747 | $(document).on('mousewheel', preventDefault); |
1748 | $(document).on('touchmove', preventDefault); | 1748 | $(document).on('touchmove', preventDefault); |
1749 | }; | 1749 | }; |
@@ -1753,13 +1753,6 @@ var enableScroll = function(){ | @@ -1753,13 +1753,6 @@ var enableScroll = function(){ | ||
1753 | $(document).off('touchmove', preventDefault); | 1753 | $(document).off('touchmove', preventDefault); |
1754 | }; | 1754 | }; |
1755 | 1755 | ||
1756 | -// bind | ||
1757 | -/**$('#closePopup').on('click', function(e){ | ||
1758 | - $('#popupLayer').hide(); | ||
1759 | - $('#bgMask').hide(); | ||
1760 | - enableScroll(); | ||
1761 | -});**/ | ||
1762 | - | ||
1763 | // 内部可滚 | 1756 | // 内部可滚 |
1764 | $sideNav.on('touchmove mousewheel', stopPropagation); | 1757 | $sideNav.on('touchmove mousewheel', stopPropagation); |
1765 | 1758 | ||
@@ -1772,7 +1765,7 @@ var startX, startY; | @@ -1772,7 +1765,7 @@ var startX, startY; | ||
1772 | $sideNav.on('touchstart', function(e){ | 1765 | $sideNav.on('touchstart', function(e){ |
1773 | startX = e.originalEvent.touches[0].pageX; | 1766 | startX = e.originalEvent.touches[0].pageX; |
1774 | startY = e.originalEvent.touches[0].pageY; | 1767 | startY = e.originalEvent.touches[0].pageY; |
1775 | -}); | 1768 | +});**/ |
1776 | 1769 | ||
1777 | // 仿innerScroll方法 | 1770 | // 仿innerScroll方法 |
1778 | /**$sideNav.on('touchmove', function(e){ | 1771 | /**$sideNav.on('touchmove', function(e){ |
@@ -1815,10 +1808,10 @@ $('.nav-btn').on('touchstart', function(event) { | @@ -1815,10 +1808,10 @@ $('.nav-btn').on('touchstart', function(event) { | ||
1815 | openSideNav = true; | 1808 | openSideNav = true; |
1816 | 1809 | ||
1817 | //设置boy高宽,页面不能上下滑动 | 1810 | //设置boy高宽,页面不能上下滑动 |
1818 | - /**$('body').css({ | 1811 | + $('body').css({ |
1819 | height: $(window).height(), | 1812 | height: $(window).height(), |
1820 | overflow: 'hidden' | 1813 | overflow: 'hidden' |
1821 | - });**/ | 1814 | + }); |
1822 | 1815 | ||
1823 | setTimeout(function() { | 1816 | setTimeout(function() { |
1824 | $sideNav.css('pointer-events', 'auto'); | 1817 | $sideNav.css('pointer-events', 'auto'); |
@@ -1834,11 +1827,11 @@ function hideSideBar() { | @@ -1834,11 +1827,11 @@ function hideSideBar() { | ||
1834 | $('.overlay').hide(); | 1827 | $('.overlay').hide(); |
1835 | $('.sub-nav').removeClass('show'); | 1828 | $('.sub-nav').removeClass('show'); |
1836 | $sideNav.removeClass('on'); | 1829 | $sideNav.removeClass('on'); |
1837 | - /**$('body').css({ | 1830 | + $('body').css({ |
1838 | height: 'auto', | 1831 | height: 'auto', |
1839 | overflow: 'auto' | 1832 | overflow: 'auto' |
1840 | - });**/ | ||
1841 | - enableScroll(); | 1833 | + }); |
1834 | + //enableScroll(); | ||
1842 | } | 1835 | } |
1843 | } | 1836 | } |
1844 | 1837 |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
-
Please register or login to post a comment