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:
commit
0d7cdd9b34
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue