luci-theme-rosy: Change the scroll bar style, compatible with each browser

Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
This commit is contained in:
Yanlan Shen 2019-01-10 11:43:27 +08:00
parent e5932a52df
commit a5e1e86ba5
3 changed files with 296 additions and 14 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -81,6 +81,17 @@
/**
* menu click
*/
if ($('.nav').length > 0 && $(window).width() > 992) {
var oScroll = new MyScrollBar({
selId: 'navBox',
time: 100,
bgColor: 'transprent',
barColor: '#839dd67a',
enterColor: '#839dd6cc',
enterShow: false
});
}
$(".main > .main-left .nav > .slide > .menu").click(function () {
var ul = $(this).next(".slide-menu");
var menu = $(this);
@ -94,6 +105,14 @@
ul.removeClass("active");
});
}
if ($('.nav').length > 0 && $(window).width() > 992) {
oScroll.setSize(200);
}
setInterval(function(){
if($('.nav').height() < $('.navbar-container').height()){
$('.nav').css('transform', 'translate(0px, 0px)');
}
}, 300);
return false;
});