refactor: Client 工程脚本更新
#Comment comment commit:6d30cd02d588f28c1c4d0d268fcb0f91ce978eca
This commit is contained in:
parent
989de263f9
commit
6d92ff6fb0
|
@ -48,20 +48,8 @@ $(function () {
|
||||||
|
|
||||||
// custom scrollbar
|
// custom scrollbar
|
||||||
var $sidebar = $('.sidebar').addNiceScroll().autoScrollSidebar({ target: arch.parent(), offsetTop: arch.parent().innerHeight() / 2 });
|
var $sidebar = $('.sidebar').addNiceScroll().autoScrollSidebar({ target: arch.parent(), offsetTop: arch.parent().innerHeight() / 2 });
|
||||||
|
$(window).on('resize', function () {
|
||||||
$sideMenu.on('click', 'a.dcjq-parent', function () {
|
$sidebar.addNiceScroll();
|
||||||
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 });
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.sidebar-toggle-box').on('click', function (e) {
|
$('.sidebar-toggle-box').on('click', function (e) {
|
||||||
|
|
Loading…
Reference in New Issue