1
0
Fork 0
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:
John Moore 2013-11-23 16:05:19 +00:00
parent beae0b97a2
commit df3bb247b9

View file

@ -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 });
}
})
});