mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
smooth scrolling for right sidebar
This commit is contained in:
parent
beae0b97a2
commit
df3bb247b9
1 changed files with 4 additions and 1 deletions
|
@ -26,7 +26,7 @@ $(function() {
|
|||
var rightsubmenu = $("#rightbar .submenu");
|
||||
var pos = rightmenu.offset();
|
||||
$(window).scroll(function() {
|
||||
if ($(this).scrollTop() > (pos.top - 60)) {
|
||||
if ($(this).scrollTop() > (pos.top)) {
|
||||
rightmenu.addClass('fixedrightbar');
|
||||
rightsubmenu.addClass('fixedrightbarsubmenu');
|
||||
}
|
||||
|
@ -34,6 +34,9 @@ $(function() {
|
|||
rightmenu.removeClass('fixedrightbar');
|
||||
rightsubmenu.removeClass('fixedrightbarsubmenu');
|
||||
}
|
||||
else {
|
||||
rightmenu.offset({ left: pos.left, top: pos.top });
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue