修改BUG:iPhoneX横屏模式下侧边栏无法滚动
This commit is contained in:
parent
e53d603211
commit
abdf2a5977
|
@ -166,7 +166,10 @@ $(function () {
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
addNiceScroll: function () {
|
addNiceScroll: function () {
|
||||||
if (!$.browser.versions.ios && $(window).width() > 768) {
|
if ($.browser.versions.ios && $(window).width() > 768) {
|
||||||
|
this.css('overflow', 'auto');
|
||||||
|
}
|
||||||
|
else if (!$.browser.versions.ios && $(window).width() > 768) {
|
||||||
this.mCustomScrollbar({ theme: 'minimal' });
|
this.mCustomScrollbar({ theme: 'minimal' });
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -180,12 +183,13 @@ $(function () {
|
||||||
var $sidebar = $('aside').addNiceScroll().autoScrollSidebar({ target: arch.parent(), offsetTop: arch.parent().innerHeight() / 2 });
|
var $sidebar = $('aside').addNiceScroll().autoScrollSidebar({ target: arch.parent(), offsetTop: arch.parent().innerHeight() / 2 });
|
||||||
|
|
||||||
$sideMenu.on('click', 'a.dcjq-parent', function () {
|
$sideMenu.on('click', 'a.dcjq-parent', function () {
|
||||||
if ($(window).width() <= 768) return;
|
if (!$.browser.versions.ios && $(window).width() > 768) {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
var offsetScroll = parseInt($this.parents('.mCSB_container').css('top').replace('px', ''));
|
var offsetScroll = parseInt($this.parents('.mCSB_container').css('top').replace('px', ''));
|
||||||
$sidebar.autoScrollSidebar({ target: $this.parent(), offsetTop: 25.5 - offsetScroll });
|
$sidebar.autoScrollSidebar({ target: $this.parent(), offsetTop: 25.5 - offsetScroll });
|
||||||
}, 600);
|
}, 600);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.sidebar-toggle-box').on('click', function () {
|
$('.sidebar-toggle-box').on('click', function () {
|
||||||
|
|
Loading…
Reference in New Issue