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:
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
|
@ -81,6 +81,17 @@
|
||||||
/**
|
/**
|
||||||
* menu click
|
* 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 () {
|
$(".main > .main-left .nav > .slide > .menu").click(function () {
|
||||||
var ul = $(this).next(".slide-menu");
|
var ul = $(this).next(".slide-menu");
|
||||||
var menu = $(this);
|
var menu = $(this);
|
||||||
|
@ -94,6 +105,14 @@
|
||||||
ul.removeClass("active");
|
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;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue