2016-10-20 17:55:29 +08:00
|
|
|
|
/*---LEFT BAR ACCORDION----*/
|
|
|
|
|
$(function () {
|
|
|
|
|
$('#nav-accordion').dcAccordion({
|
|
|
|
|
eventType: 'click',
|
|
|
|
|
autoClose: true,
|
|
|
|
|
saveState: true,
|
|
|
|
|
disableLink: true,
|
|
|
|
|
speed: 'slow',
|
|
|
|
|
showCount: false,
|
|
|
|
|
autoExpand: true,
|
|
|
|
|
// cookie: 'dcjq-accordion-1',
|
|
|
|
|
classExpand: 'dcjq-current-parent'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
(function ($) {
|
|
|
|
|
// sidebar dropdown menu auto scrolling
|
|
|
|
|
$('#sidebar .sub-menu > a').click(function () {
|
|
|
|
|
var o = ($(this).offset());
|
|
|
|
|
diff = 300 - o.top;
|
|
|
|
|
if (diff > 0)
|
|
|
|
|
$("#sidebar").scrollTo("-=" + Math.abs(diff), 500);
|
|
|
|
|
else
|
|
|
|
|
$("#sidebar").scrollTo("+=" + Math.abs(diff), 500);
|
|
|
|
|
});
|
|
|
|
|
|
2016-11-07 17:26:17 +08:00
|
|
|
|
$('.sidebar-toggle-box').click(function () {
|
2016-11-09 20:29:52 +08:00
|
|
|
|
if ($('#sidebar').is(":visible") === true) {
|
|
|
|
|
$(".sidebar").addClass("sidebar-closed");
|
2016-10-20 17:55:29 +08:00
|
|
|
|
} else {
|
2016-11-09 20:29:52 +08:00
|
|
|
|
$(".sidebar").removeClass("sidebar-closed");
|
|
|
|
|
$("#sidebar").show();
|
2016-10-20 17:55:29 +08:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// custom scrollbar
|
|
|
|
|
$("#sidebar").niceScroll({ styler: "fb", cursorcolor: "#e8403f", cursorwidth: '3', cursorborderradius: '10px', background: '#404040', spacebarenabled: false, cursorborder: '', scrollspeed: 60 });
|
|
|
|
|
|
|
|
|
|
//$("html").niceScroll({styler:"fb",cursorcolor:"#e8403f", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', spacebarenabled:false, cursorborder: '', zindex: '1000', scrollspeed: 100, mousescrollstep: 60});
|
|
|
|
|
|
2016-10-24 00:00:29 +08:00
|
|
|
|
//$(".table-responsive").niceScroll({ styler: "fb", cursorcolor: "#e8403f", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', spacebarenabled: false, cursorborder: '', zindex: '1000', horizrailenabled: true });
|
2016-10-20 17:55:29 +08:00
|
|
|
|
})(jQuery);
|