refactor: Client 工程脚本更新

#Comment
comment commit:6d30cd02d588f28c1c4d0d268fcb0f91ce978eca
This commit is contained in:
Argo Zhang 2019-08-19 11:37:41 +08:00
parent 989de263f9
commit 6d92ff6fb0
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
1 changed files with 2 additions and 14 deletions

View File

@ -48,20 +48,8 @@ $(function () {
// custom scrollbar
var $sidebar = $('.sidebar').addNiceScroll().autoScrollSidebar({ target: arch.parent(), offsetTop: arch.parent().innerHeight() / 2 });
$sideMenu.on('click', 'a.dcjq-parent', function () {
return;
var $this = $(this);
if (!$.browser.versions.ios && $(window).width() > 768) {
setTimeout(function () {
var offsetScroll = parseInt($this.parents('.mCSB_container').css('top').replace('px', ''));
$sidebar.autoScrollSidebar({ target: $this.parent(), offsetTop: 25.5 - offsetScroll });
}, 600);
}
else if ($.browser.versions.ios && $(window).width() > 768) {
var offsetScroll = parseInt($this.parents('aside').scrollTop());
$sidebar.autoScrollSidebar({ target: $this.parent(), offsetTop: 25.5 + offsetScroll });
}
$(window).on('resize', function () {
$sidebar.addNiceScroll();
});
$('.sidebar-toggle-box').on('click', function (e) {