mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-06-25 18:20:31 +00:00
feat: replacing jquery.scrollbar by perfect-scrollbar
This commit is contained in:
parent
fb77b7e737
commit
6686e925c0
9 changed files with 48 additions and 186 deletions
static/js
|
@ -27,6 +27,7 @@ function getScrollBarWidth() {
|
|||
|
||||
function setMenuHeight() {
|
||||
$('#sidebar .highlightable').height($('#sidebar').innerHeight() - $('#header-wrapper').height() - 40);
|
||||
$('#sidebar .highlightable').perfectScrollbar('update');
|
||||
}
|
||||
|
||||
function fallbackMessage(action) {
|
||||
|
@ -83,7 +84,7 @@ $(window).resize(function() {
|
|||
|
||||
jQuery(document).ready(function() {
|
||||
var sidebarStatus = searchStatus = 'open';
|
||||
|
||||
$('#sidebar .highlightable').perfectScrollbar();
|
||||
// set the menu height
|
||||
setMenuHeight();
|
||||
|
||||
|
@ -94,8 +95,6 @@ jQuery(document).ready(function() {
|
|||
return false;
|
||||
});
|
||||
|
||||
jQuery('.scrollbar-inner').scrollbar();
|
||||
|
||||
jQuery('[data-sidebar-toggle]').on('click', function() {
|
||||
jQuery(document.body).toggleClass('sidebar-hidden');
|
||||
sidebarStatus = (jQuery(document.body).hasClass('sidebar-hidden') ? 'closed' : 'open');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue