1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 09:49:30 +02:00

Merge pull request #48 from jcwmoore/master

smooth scrolling for right sidebar
This commit is contained in:
SUTJael 2013-11-28 15:30:53 -08:00
commit 0d7cdd9b34

View file

@ -37,7 +37,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');
}
@ -45,6 +45,9 @@ $(function() {
rightmenu.removeClass('fixedrightbar');
rightsubmenu.removeClass('fixedrightbarsubmenu');
}
else {
rightmenu.offset({ left: pos.left, top: pos.top });
}
})
});
@ -101,4 +104,4 @@ function reloadUtil(target) {
// Send them elsewhere
function reloadRedirect(target) {
window.location = target;
}
}