Authored by 梁志锋

gulp ge文件提交

... ... @@ -1719,7 +1719,7 @@ function stopPropagation(e){
e.cancelBubble = false;
}
function innerScroll(e){
/**function innerScroll(e){
// 阻止冒泡到document
// document上已经preventDefault
stopPropagation(e);
... ... @@ -1741,7 +1741,7 @@ function innerScroll(e){
}
// 会阻止原生滚动
// return false;
}
}**/
var disableScroll = function(){
$(document).on('mousewheel', preventDefault);
... ... @@ -1760,8 +1760,9 @@ var enableScroll = function(){
enableScroll();
});**/
// 内部可滚
$sideNav.on('mousewheel', innerScroll);
// 内部可滚
$sideNav.on('touchmove mousewheel', stopPropagation);
// 外部禁用
disableScroll();
... ... @@ -1774,7 +1775,7 @@ $sideNav.on('touchstart', function(e){
});
// 仿innerScroll方法
$sideNav.on('touchmove', function(e){
/**$sideNav.on('touchmove', function(e){
e.stopPropagation();
var deltaX = e.originalEvent.touches[0].pageX - startX;
... ... @@ -1802,7 +1803,7 @@ $sideNav.on('touchmove', function(e){
}
// 会阻止原生滚动
// return false;
});
});**/
$('.nav-btn').on('touchstart', function(event) {
$sideNav.css('pointer-events', 'none');
... ... @@ -1814,10 +1815,10 @@ $('.nav-btn').on('touchstart', function(event) {
openSideNav = true;
//设置boy高宽,页面不能上下滑动
$('body').css({
/**$('body').css({
height: $(window).height(),
overflow: 'hidden'
});
});**/
setTimeout(function() {
$sideNav.css('pointer-events', 'auto');
... ... @@ -1833,10 +1834,10 @@ function hideSideBar() {
$('.overlay').hide();
$('.sub-nav').removeClass('show');
$sideNav.removeClass('on');
$('body').css({
/**$('body').css({
height: 'auto',
overflow: 'auto'
});
});**/
enableScroll();
}
}
... ... @@ -1861,7 +1862,7 @@ $sideNav.on('touchend', 'li', function(e) {
//返回一级导航,收起二级导航
$subNav.each(function() {
$(this).find('li').eq(0).on('touchstart', function() {
$(this).find('li').eq(0).on('touchend', function() {
$('.sub-nav').removeClass('show');
return false;
});
... ...
This diff could not be displayed because it is too large.